incident_io_api 2.30.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/incident_io/api/alert_attachments_v2_api.rb +230 -0
- data/lib/incident_io/models/alert_attachment_v2.rb +267 -0
- data/lib/incident_io/models/alert_attachments_create_payload_v2.rb +195 -0
- data/lib/incident_io/models/alert_attachments_create_result_v2.rb +164 -0
- data/lib/incident_io/models/alert_attachments_list_result_v2.rb +175 -0
- data/lib/incident_io/models/audit_log_actor_metadata_v2.rb +14 -4
- data/lib/incident_io/models/audit_log_reliability_review_repository_updated_metadata_v2.rb +165 -0
- data/lib/incident_io/models/audit_log_reliability_review_settings_updated_metadata_v2.rb +245 -0
- data/lib/incident_io/models/audit_log_reliability_review_spend_limit_updated_metadata_v2.rb +158 -0
- data/lib/incident_io/models/audit_log_target_v2.rb +1 -1
- data/lib/incident_io/models/audit_logs_activity_log_scrubbed_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_chat_message_template_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_chat_message_template_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_chat_message_template_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_priority_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_priority_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_priority_set_as_default_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_priority_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_route_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_route_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_route_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_schema_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_scrubbed_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_source_config_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_source_config_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_alert_source_config_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_announcement_post_template_created_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_announcement_post_template_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_announcement_post_template_set_as_default_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_announcement_post_template_updated_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_announcement_rule_created_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_announcement_rule_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_announcement_rule_updated_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_api_key_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_api_key_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_api_key_rotated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_api_key_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_catalog_entry_attribute_updated_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_catalog_type_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_catalog_type_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_catalog_type_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_connector_config_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_connector_config_token_generated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_connector_config_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_custom_field_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_custom_field_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_custom_field_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_debrief_invite_rule_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_debrief_invite_rule_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_debrief_invite_rule_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_email_otp_login_setting_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_escalation_path_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_escalation_path_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_escalation_path_template_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_escalation_path_template_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_escalation_path_template_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_escalation_path_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_escalation_scrubbed_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_extension_connector_called_v5.rb +326 -0
- data/lib/incident_io/models/audit_logs_extension_plugin_created_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_extension_plugin_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_extension_plugin_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_follow_up_category_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_follow_up_category_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_follow_up_category_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_follow_up_priority_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_follow_up_priority_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_follow_up_priority_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_glossary_entry_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_glossary_entry_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_glossary_entry_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_holiday_user_feed_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_holiday_user_feed_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_holiday_user_feed_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_hris_time_off_policy_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_incident_call_setting_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_call_transcription_session_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_duration_metric_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_duration_metric_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_duration_metric_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_role_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_role_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_role_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_scrubbed_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_status_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_status_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_status_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_template_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_template_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_template_set_as_default_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_template_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_timestamp_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_timestamp_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_timestamp_set_by_rule_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_timestamp_set_by_rule_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_timestamp_set_by_rule_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_timestamp_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_type_created_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_incident_type_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_incident_type_updated_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_integration_installed_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_integration_uninstalled_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_internal_status_page_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_internal_status_page_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_internal_status_page_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_investigation_config_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_investigation_trigger_created_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_investigation_trigger_deleted_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_investigation_trigger_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_ip_allowlist_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_maintenance_window_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_maintenance_window_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_maintenance_window_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_microsoft_entra_tenant_linked_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_mobile_intune_enabled_setting_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_nudge_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_nudge_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_nudge_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_on_call_notification_method_created_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_on_call_notification_method_destroyed_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_on_call_notification_pause_created_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_on_call_notification_pause_deleted_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_on_call_notification_pause_resumed_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_on_call_notification_pause_updated_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_on_call_upsell_requested_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_organisation_settings_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_policy_created_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_policy_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_policy_report_schedule_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_policy_report_schedule_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_policy_report_schedule_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_policy_updated_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_post_incident_task_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_post_incident_task_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_post_incident_task_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_postmortem_section_created_v3.rb +300 -0
- data/lib/incident_io/models/audit_logs_postmortem_section_deleted_v3.rb +300 -0
- data/lib/incident_io/models/audit_logs_postmortem_section_updated_v3.rb +300 -0
- data/lib/incident_io/models/audit_logs_postmortem_template_created_v3.rb +300 -0
- data/lib/incident_io/models/audit_logs_postmortem_template_deleted_v3.rb +300 -0
- data/lib/incident_io/models/audit_logs_postmortem_template_updated_v3.rb +300 -0
- data/lib/incident_io/models/audit_logs_private_alert_access_attempted_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_private_escalation_access_attempted_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_private_incident_access_attempted_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_private_incident_access_requested_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_private_incident_accessed_via_bot_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_private_incident_membership_granted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_private_incident_membership_revoked_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_private_incident_membership_upgraded_to_direct_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_private_incident_team_membership_granted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_private_incident_team_membership_revoked_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_private_insights_exported_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_private_insights_measure_queried_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_private_insights_underlying_data_queried_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_qr_code_mobile_login_setting_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_rbac_role_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_rbac_role_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_rbac_role_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_reliability_review_repository_updated_v1.rb +326 -0
- data/lib/incident_io/models/audit_logs_reliability_review_repository_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_reliability_review_settings_updated_v1.rb +326 -0
- data/lib/incident_io/models/audit_logs_reliability_review_settings_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_reliability_review_spend_limit_updated_v1.rb +326 -0
- data/lib/incident_io/models/audit_logs_reliability_review_spend_limit_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_schedule_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_schedule_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_schedule_override_created_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_schedule_override_deleted_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_schedule_override_updated_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_schedule_sync_rule_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_schedule_sync_rule_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_schedule_sync_rule_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_schedule_sync_target_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_schedule_sync_target_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_schedule_sync_target_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_schedule_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_scim_group_role_mappings_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_scim_group_seat_mappings_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_secret_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_secret_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_secret_reference_added_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_secret_reference_removed_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_secret_rotated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_secret_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_severity_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_severity_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_severity_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_sub_page_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_sub_page_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_sub_page_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_template_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_template_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_template_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_status_page_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_team_role_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_team_role_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_team_role_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_team_settings_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_access_mode_changed_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_access_policy_changed_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_caller_identity_sharing_changed_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_installed_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_passthrough_changed_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_queried_v3.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_requested_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_tool_access_changed_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_tool_overrides_changed_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_uninstalled_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_write_access_granted_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_telemetry_data_source_write_access_revoked_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_timeline_item_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_twilio_connection_created_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_twilio_connection_deleted_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_twilio_connection_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_user_api_key_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_user_api_key_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_user_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_user_deactivated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_user_logged_in_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_user_reinstated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_user_role_memberships_updated_v2.rb +326 -0
- data/lib/incident_io/models/audit_logs_user_updated_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_workflow_created_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_workflow_deleted_v2.rb +300 -0
- data/lib/incident_io/models/audit_logs_workflow_updated_v2.rb +300 -0
- data/lib/incident_io/models/incident_activity_log_entry_v2.rb +1 -1
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +225 -0
- metadata +226 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50560ae8faf0b4a1c830eef2d6d2ef4bf25dbe4df8c109f60809003fcff0bda0
|
|
4
|
+
data.tar.gz: 7b2e40f0d9c5f9b59f27ea02eec0a11e2f045e0a755dba358fedc819dd8d197a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6bfeb54c0b6dfda2f7d3c55f97dd032d953349e4bc90a3e73a829b6d00eabd59e73883f5023703c0104f5b4dc3d68f516a2aed089c4f6f14c1109adbd092dcd6
|
|
7
|
+
data.tar.gz: '0900b58715657487f9682d6fcd905209df8b993835ce4c2de41d1b7575f9b4ef24187b270919edc1c23d8b3354d770381eff93d695f8d0c9b25b7623670ae93e'
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#incident.io
|
|
3
|
+
|
|
4
|
+
#Ruby client for the incident.io API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module IncidentIo
|
|
16
|
+
class AlertAttachmentsV2Api
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Alert Attachments V2
|
|
23
|
+
# Attach a URL to an alert or alert group. Provide exactly one of alert_id or alert_group_id. A URL for a ticket or pull request from a connected integration is attached as that ticket or pull request. Any other URL is attached as a link. A URL that is already attached returns a 422.
|
|
24
|
+
# @param alert_attachments_create_payload_v2 [AlertAttachmentsCreatePayloadV2]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [AlertAttachmentsCreateResultV2]
|
|
27
|
+
def alert_attachments_v2_create(alert_attachments_create_payload_v2, opts = {})
|
|
28
|
+
data, _status_code, _headers = alert_attachments_v2_create_with_http_info(alert_attachments_create_payload_v2, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create Alert Attachments V2
|
|
33
|
+
# Attach a URL to an alert or alert group. Provide exactly one of alert_id or alert_group_id. A URL for a ticket or pull request from a connected integration is attached as that ticket or pull request. Any other URL is attached as a link. A URL that is already attached returns a 422.
|
|
34
|
+
# @param alert_attachments_create_payload_v2 [AlertAttachmentsCreatePayloadV2]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(AlertAttachmentsCreateResultV2, Integer, Hash)>] AlertAttachmentsCreateResultV2 data, response status code and response headers
|
|
37
|
+
def alert_attachments_v2_create_with_http_info(alert_attachments_create_payload_v2, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AlertAttachmentsV2Api.alert_attachments_v2_create ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'alert_attachments_create_payload_v2' is set
|
|
42
|
+
if @api_client.config.client_side_validation && alert_attachments_create_payload_v2.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'alert_attachments_create_payload_v2' when calling AlertAttachmentsV2Api.alert_attachments_v2_create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v2/alert_attachments'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(alert_attachments_create_payload_v2)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'AlertAttachmentsCreateResultV2'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"AlertAttachmentsV2Api.alert_attachments_v2_create",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: AlertAttachmentsV2Api#alert_attachments_v2_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Delete Alert Attachments V2
|
|
91
|
+
# Remove an attachment from its alert or alert group.
|
|
92
|
+
# @param id [String] ID of the alert attachment
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def alert_attachments_v2_delete(id, opts = {})
|
|
96
|
+
alert_attachments_v2_delete_with_http_info(id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Delete Alert Attachments V2
|
|
101
|
+
# Remove an attachment from its alert or alert group.
|
|
102
|
+
# @param id [String] ID of the alert attachment
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def alert_attachments_v2_delete_with_http_info(id, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: AlertAttachmentsV2Api.alert_attachments_v2_delete ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'id' is set
|
|
110
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AlertAttachmentsV2Api.alert_attachments_v2_delete"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/v2/alert_attachments/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Accept' (if needed)
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
|
+
|
|
124
|
+
# form parameters
|
|
125
|
+
form_params = opts[:form_params] || {}
|
|
126
|
+
|
|
127
|
+
# http body (model)
|
|
128
|
+
post_body = opts[:debug_body]
|
|
129
|
+
|
|
130
|
+
# return_type
|
|
131
|
+
return_type = opts[:debug_return_type]
|
|
132
|
+
|
|
133
|
+
# auth_names
|
|
134
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
135
|
+
|
|
136
|
+
new_options = opts.merge(
|
|
137
|
+
:operation => :"AlertAttachmentsV2Api.alert_attachments_v2_delete",
|
|
138
|
+
:header_params => header_params,
|
|
139
|
+
:query_params => query_params,
|
|
140
|
+
:form_params => form_params,
|
|
141
|
+
:body => post_body,
|
|
142
|
+
:auth_names => auth_names,
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug "API called: AlertAttachmentsV2Api#alert_attachments_v2_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
return data, status_code, headers
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# List Alert Attachments V2
|
|
154
|
+
# List the attachments on an alert or alert group, newest first. Provide exactly one of alert_id or alert_group_id. Listing by alert_id returns only what is attached to that alert, not what is attached to its alert group.
|
|
155
|
+
# @param [Hash] opts the optional parameters
|
|
156
|
+
# @option opts [String] :alert_id ID of the alert to list attachments for. Provide exactly one of alert_id or alert_group_id.
|
|
157
|
+
# @option opts [String] :alert_group_id ID of the alert group to list attachments for. Provide exactly one of alert_id or alert_group_id.
|
|
158
|
+
# @option opts [Integer] :page_size Integer number of records to return (default to 25)
|
|
159
|
+
# @option opts [String] :after An alert attachment's ID. This endpoint will return the attachments after this one in the response order.
|
|
160
|
+
# @return [AlertAttachmentsListResultV2]
|
|
161
|
+
def alert_attachments_v2_list(opts = {})
|
|
162
|
+
data, _status_code, _headers = alert_attachments_v2_list_with_http_info(opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# List Alert Attachments V2
|
|
167
|
+
# List the attachments on an alert or alert group, newest first. Provide exactly one of alert_id or alert_group_id. Listing by alert_id returns only what is attached to that alert, not what is attached to its alert group.
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [String] :alert_id ID of the alert to list attachments for. Provide exactly one of alert_id or alert_group_id.
|
|
170
|
+
# @option opts [String] :alert_group_id ID of the alert group to list attachments for. Provide exactly one of alert_id or alert_group_id.
|
|
171
|
+
# @option opts [Integer] :page_size Integer number of records to return (default to 25)
|
|
172
|
+
# @option opts [String] :after An alert attachment's ID. This endpoint will return the attachments after this one in the response order.
|
|
173
|
+
# @return [Array<(AlertAttachmentsListResultV2, Integer, Hash)>] AlertAttachmentsListResultV2 data, response status code and response headers
|
|
174
|
+
def alert_attachments_v2_list_with_http_info(opts = {})
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: AlertAttachmentsV2Api.alert_attachments_v2_list ...'
|
|
177
|
+
end
|
|
178
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 250
|
|
179
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AlertAttachmentsV2Api.alert_attachments_v2_list, must be smaller than or equal to 250.'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
183
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AlertAttachmentsV2Api.alert_attachments_v2_list, must be greater than or equal to 1.'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# resource path
|
|
187
|
+
local_var_path = '/v2/alert_attachments'
|
|
188
|
+
|
|
189
|
+
# query parameters
|
|
190
|
+
query_params = opts[:query_params] || {}
|
|
191
|
+
query_params[:'alert_id'] = opts[:'alert_id'] if !opts[:'alert_id'].nil?
|
|
192
|
+
query_params[:'alert_group_id'] = opts[:'alert_group_id'] if !opts[:'alert_group_id'].nil?
|
|
193
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
194
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
195
|
+
|
|
196
|
+
# header parameters
|
|
197
|
+
header_params = opts[:header_params] || {}
|
|
198
|
+
# HTTP header 'Accept' (if needed)
|
|
199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
200
|
+
|
|
201
|
+
# form parameters
|
|
202
|
+
form_params = opts[:form_params] || {}
|
|
203
|
+
|
|
204
|
+
# http body (model)
|
|
205
|
+
post_body = opts[:debug_body]
|
|
206
|
+
|
|
207
|
+
# return_type
|
|
208
|
+
return_type = opts[:debug_return_type] || 'AlertAttachmentsListResultV2'
|
|
209
|
+
|
|
210
|
+
# auth_names
|
|
211
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
212
|
+
|
|
213
|
+
new_options = opts.merge(
|
|
214
|
+
:operation => :"AlertAttachmentsV2Api.alert_attachments_v2_list",
|
|
215
|
+
:header_params => header_params,
|
|
216
|
+
:query_params => query_params,
|
|
217
|
+
:form_params => form_params,
|
|
218
|
+
:body => post_body,
|
|
219
|
+
:auth_names => auth_names,
|
|
220
|
+
:return_type => return_type
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug "API called: AlertAttachmentsV2Api#alert_attachments_v2_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
226
|
+
end
|
|
227
|
+
return data, status_code, headers
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#incident.io
|
|
3
|
+
|
|
4
|
+
#Ruby client for the incident.io API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module IncidentIo
|
|
17
|
+
# Something attached to an alert or alert group, such as a ticket, a pull request or a link.
|
|
18
|
+
class AlertAttachmentV2 < ApiModelBase
|
|
19
|
+
# ID of the alert group this is attached to. Exactly one of alert_id or alert_group_id is set.
|
|
20
|
+
attr_accessor :alert_group_id
|
|
21
|
+
|
|
22
|
+
# ID of the alert this is attached to. Exactly one of alert_id or alert_group_id is set.
|
|
23
|
+
attr_accessor :alert_id
|
|
24
|
+
|
|
25
|
+
# When it was attached
|
|
26
|
+
attr_accessor :created_at
|
|
27
|
+
|
|
28
|
+
# Unique identifier for the alert attachment
|
|
29
|
+
attr_accessor :id
|
|
30
|
+
|
|
31
|
+
# The ticket or pull request's title, or the link's title
|
|
32
|
+
attr_accessor :title
|
|
33
|
+
|
|
34
|
+
# URL of the attached ticket, pull request or link
|
|
35
|
+
attr_accessor :url
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'alert_group_id' => :'alert_group_id',
|
|
41
|
+
:'alert_id' => :'alert_id',
|
|
42
|
+
:'created_at' => :'created_at',
|
|
43
|
+
:'id' => :'id',
|
|
44
|
+
:'title' => :'title',
|
|
45
|
+
:'url' => :'url'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns attribute mapping this model knows about
|
|
50
|
+
def self.acceptable_attribute_map
|
|
51
|
+
attribute_map
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
acceptable_attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'alert_group_id' => :'String',
|
|
63
|
+
:'alert_id' => :'String',
|
|
64
|
+
:'created_at' => :'Time',
|
|
65
|
+
:'id' => :'String',
|
|
66
|
+
:'title' => :'String',
|
|
67
|
+
:'url' => :'String'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AlertAttachmentV2` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AlertAttachmentV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'alert_group_id')
|
|
94
|
+
self.alert_group_id = attributes[:'alert_group_id']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'alert_id')
|
|
98
|
+
self.alert_id = attributes[:'alert_id']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'created_at')
|
|
102
|
+
self.created_at = attributes[:'created_at']
|
|
103
|
+
else
|
|
104
|
+
self.created_at = nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'id')
|
|
108
|
+
self.id = attributes[:'id']
|
|
109
|
+
else
|
|
110
|
+
self.id = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'title')
|
|
114
|
+
self.title = attributes[:'title']
|
|
115
|
+
else
|
|
116
|
+
self.title = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'url')
|
|
120
|
+
self.url = attributes[:'url']
|
|
121
|
+
else
|
|
122
|
+
self.url = nil
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
127
|
+
# @return Array for valid properties with the reasons
|
|
128
|
+
def list_invalid_properties
|
|
129
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
130
|
+
invalid_properties = Array.new
|
|
131
|
+
if @created_at.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if @id.nil?
|
|
136
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if @title.nil?
|
|
140
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if @url.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
invalid_properties
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Check to see if the all the properties in the model are valid
|
|
151
|
+
# @return true if the model is valid
|
|
152
|
+
def valid?
|
|
153
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
154
|
+
return false if @created_at.nil?
|
|
155
|
+
return false if @id.nil?
|
|
156
|
+
return false if @title.nil?
|
|
157
|
+
return false if @url.nil?
|
|
158
|
+
true
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Custom attribute writer method with validation
|
|
162
|
+
# @param [Object] created_at Value to be assigned
|
|
163
|
+
def created_at=(created_at)
|
|
164
|
+
if created_at.nil?
|
|
165
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
@created_at = created_at
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Custom attribute writer method with validation
|
|
172
|
+
# @param [Object] id Value to be assigned
|
|
173
|
+
def id=(id)
|
|
174
|
+
if id.nil?
|
|
175
|
+
fail ArgumentError, 'id cannot be nil'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@id = id
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Custom attribute writer method with validation
|
|
182
|
+
# @param [Object] title Value to be assigned
|
|
183
|
+
def title=(title)
|
|
184
|
+
if title.nil?
|
|
185
|
+
fail ArgumentError, 'title cannot be nil'
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
@title = title
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Custom attribute writer method with validation
|
|
192
|
+
# @param [Object] url Value to be assigned
|
|
193
|
+
def url=(url)
|
|
194
|
+
if url.nil?
|
|
195
|
+
fail ArgumentError, 'url cannot be nil'
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
@url = url
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Checks equality by comparing each attribute.
|
|
202
|
+
# @param [Object] Object to be compared
|
|
203
|
+
def ==(o)
|
|
204
|
+
return true if self.equal?(o)
|
|
205
|
+
self.class == o.class &&
|
|
206
|
+
alert_group_id == o.alert_group_id &&
|
|
207
|
+
alert_id == o.alert_id &&
|
|
208
|
+
created_at == o.created_at &&
|
|
209
|
+
id == o.id &&
|
|
210
|
+
title == o.title &&
|
|
211
|
+
url == o.url
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# @see the `==` method
|
|
215
|
+
# @param [Object] Object to be compared
|
|
216
|
+
def eql?(o)
|
|
217
|
+
self == o
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Calculates hash code according to all attributes.
|
|
221
|
+
# @return [Integer] Hash code
|
|
222
|
+
def hash
|
|
223
|
+
[alert_group_id, alert_id, created_at, id, title, url].hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Builds the object from hash
|
|
227
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
228
|
+
# @return [Object] Returns the model itself
|
|
229
|
+
def self.build_from_hash(attributes)
|
|
230
|
+
return nil unless attributes.is_a?(Hash)
|
|
231
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
232
|
+
transformed_hash = {}
|
|
233
|
+
openapi_types.each_pair do |key, type|
|
|
234
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
235
|
+
transformed_hash["#{key}"] = nil
|
|
236
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
237
|
+
# check to ensure the input is an array given that the attribute
|
|
238
|
+
# is documented as an array but the input is not
|
|
239
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
240
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
241
|
+
end
|
|
242
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
243
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
new(transformed_hash)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Returns the object in the form of hash
|
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
|
251
|
+
def to_hash
|
|
252
|
+
hash = {}
|
|
253
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
254
|
+
value = self.send(attr)
|
|
255
|
+
if value.nil?
|
|
256
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
257
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
hash[param] = _to_hash(value)
|
|
261
|
+
end
|
|
262
|
+
hash
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|