datadog_api_client 2.46.0 → 2.48.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.
Files changed (276) hide show
  1. checksums.yaml +4 -4
  2. data/.generator/schemas/v1/openapi.yaml +201 -12
  3. data/.generator/schemas/v2/openapi.yaml +3391 -684
  4. data/CHANGELOG.md +46 -0
  5. data/examples/v1/dashboards/CreateDashboard_3685886950.rb +36 -0
  6. data/examples/v1/dashboards/CreateDashboard_865807520.rb +36 -0
  7. data/examples/v1/dashboards/CreateDashboard_9836563.rb +118 -0
  8. data/examples/v2/apm/GetServiceList.rb +5 -0
  9. data/examples/v2/aws-integration/CreateAWSAccount.rb +11 -0
  10. data/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb +11 -0
  11. data/examples/v2/aws-integration/UpdateAWSAccount.rb +11 -0
  12. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +3 -1
  13. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1363354233.rb +1 -1
  14. data/examples/v2/deployment-gates/GetDeploymentGateRules.rb +11 -0
  15. data/examples/v2/events/CreateEvent.rb +1 -0
  16. data/examples/v2/incidents/CreateIncidentAttachment.rb +22 -0
  17. data/examples/v2/incidents/DeleteIncidentAttachment.rb +8 -0
  18. data/examples/v2/incidents/ListIncidentAttachments.rb +1 -1
  19. data/examples/v2/incidents/UpdateIncidentAttachment.rb +20 -0
  20. data/examples/v2/observability-pipelines/CreatePipeline.rb +12 -4
  21. data/examples/v2/observability-pipelines/UpdatePipeline.rb +12 -4
  22. data/examples/v2/observability-pipelines/ValidatePipeline.rb +12 -4
  23. data/examples/v2/on-call/CreateUserNotificationChannel.rb +23 -0
  24. data/examples/v2/on-call/CreateUserNotificationRule.rb +29 -0
  25. data/examples/v2/on-call/DeleteUserNotificationChannel.rb +11 -0
  26. data/examples/v2/on-call/DeleteUserNotificationRule.rb +11 -0
  27. data/examples/v2/on-call/GetUserNotificationChannel.rb +11 -0
  28. data/examples/v2/on-call/GetUserNotificationRule.rb +14 -0
  29. data/examples/v2/on-call/ListUserNotificationChannels.rb +8 -0
  30. data/examples/v2/on-call/ListUserNotificationRules.rb +11 -0
  31. data/examples/v2/on-call/UpdateUserNotificationRule.rb +36 -0
  32. data/examples/v2/product-analytics/SubmitProductAnalyticsEvent.rb +24 -0
  33. data/examples/v2/security-monitoring/CreateCases.rb +2 -2
  34. data/examples/v2/security-monitoring/CreateCases_2385516013.rb +1 -1
  35. data/examples/v2/security-monitoring/CreateCases_2798851680.rb +2 -2
  36. data/examples/v2/security-monitoring/CreateJiraIssues.rb +14 -69
  37. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_2323193894.rb +48 -0
  38. data/examples/v2/security-monitoring/GetSecretsRules.rb +1 -1
  39. data/examples/v2/security-monitoring/GetSuppressionVersionHistory.rb +8 -0
  40. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule_2609327779.rb +54 -0
  41. data/examples/v2/synthetics/PatchGlobalVariable.rb +19 -0
  42. data/examples/v2/teams/CreateTeamNotificationRule.rb +23 -0
  43. data/examples/v2/teams/DeleteTeamConnections.rb +0 -3
  44. data/examples/v2/teams/DeleteTeamNotificationRule.rb +11 -0
  45. data/examples/v2/teams/GetTeamNotificationRule.rb +11 -0
  46. data/examples/v2/teams/GetTeamNotificationRules.rb +8 -0
  47. data/examples/v2/teams/GetTeamSync.rb +0 -3
  48. data/examples/v2/teams/ListTeamConnections.rb +0 -3
  49. data/examples/v2/teams/ListTeamConnections_2418873869.rb +0 -3
  50. data/examples/v2/teams/SyncTeams.rb +0 -3
  51. data/examples/v2/teams/SyncTeams_3215592344.rb +0 -3
  52. data/examples/v2/teams/UpdateTeamNotificationRule.rb +27 -0
  53. data/lib/datadog_api_client/configuration.rb +59 -9
  54. data/lib/datadog_api_client/inflector.rb +135 -26
  55. data/lib/datadog_api_client/v1/api/synthetics_api.rb +3 -3
  56. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -4
  57. data/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb +13 -3
  58. data/lib/datadog_api_client/v1/models/formula_and_function_metric_semantic_mode.rb +27 -0
  59. data/lib/datadog_api_client/v1/models/geomap_widget_definition.rb +4 -5
  60. data/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb +1 -1
  61. data/lib/datadog_api_client/v1/models/geomap_widget_request.rb +37 -3
  62. data/lib/datadog_api_client/v1/models/geomap_widget_request_style.rb +105 -0
  63. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +3 -0
  64. data/lib/datadog_api_client/v1/models/monitor_search_response.rb +1 -1
  65. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
  66. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +61 -1
  67. data/lib/datadog_api_client/v1/models/synthetics_list_tests_response.rb +1 -1
  68. data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +1 -1
  69. data/lib/datadog_api_client/v1/models/synthetics_test_details_without_steps.rb +221 -0
  70. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
  71. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
  72. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
  73. data/lib/datadog_api_client/v2/api/apm_api.rb +83 -0
  74. data/lib/datadog_api_client/v2/api/deployment_gates_api.rb +71 -0
  75. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +8 -8
  76. data/lib/datadog_api_client/v2/api/incidents_api.rb +188 -54
  77. data/lib/datadog_api_client/v2/api/on_call_api.rb +637 -0
  78. data/lib/datadog_api_client/v2/api/product_analytics_api.rb +121 -0
  79. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +99 -11
  80. data/lib/datadog_api_client/v2/api/software_catalog_api.rb +4 -0
  81. data/lib/datadog_api_client/v2/api/synthetics_api.rb +79 -0
  82. data/lib/datadog_api_client/v2/api/teams_api.rb +345 -30
  83. data/lib/datadog_api_client/v2/models/attach_case_request_data.rb +1 -1
  84. data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data.rb +1 -11
  85. data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_attributes.rb +1 -1
  86. data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_attributes_fields.rb → attachment.rb} +22 -10
  87. data/lib/datadog_api_client/v2/models/{incident_attachments_response.rb → attachment_array.rb} +7 -7
  88. data/lib/datadog_api_client/v2/models/{incident_attachment_data.rb → attachment_data.rb} +8 -8
  89. data/lib/datadog_api_client/v2/models/attachment_data_attributes.rb +125 -0
  90. data/lib/datadog_api_client/v2/models/attachment_data_attributes_attachment.rb +115 -0
  91. data/lib/datadog_api_client/v2/models/{incident_attachment_attachment_type.rb → attachment_data_attributes_attachment_type.rb} +3 -3
  92. data/lib/datadog_api_client/v2/models/{incident_attachment_relationships.rb → attachment_data_relationships.rb} +5 -5
  93. data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_relationships_case.rb → attachment_data_relationships_last_modified_by_user.rb} +5 -5
  94. data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_relationships_case_data.rb → attachment_data_relationships_last_modified_by_user_data.rb} +5 -5
  95. data/lib/datadog_api_client/v2/models/{incident_attachments_response_included_item.rb → attachment_included.rb} +3 -3
  96. data/lib/datadog_api_client/v2/models/aws_account_create_request_attributes.rb +11 -1
  97. data/lib/datadog_api_client/v2/models/aws_account_response_attributes.rb +11 -1
  98. data/lib/datadog_api_client/v2/models/aws_account_update_request_attributes.rb +11 -1
  99. data/lib/datadog_api_client/v2/models/awsccm_config.rb +107 -0
  100. data/lib/datadog_api_client/v2/models/case_create_attributes.rb +11 -1
  101. data/lib/datadog_api_client/v2/models/case_insights_items.rb +3 -3
  102. data/lib/datadog_api_client/v2/models/case_management_project_data.rb +1 -1
  103. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_attributes.rb +11 -1
  104. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_version.rb +2 -2
  105. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +2 -2
  106. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_hash.rb +105 -0
  107. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +1 -1
  108. data/lib/datadog_api_client/v2/models/{incident_attachment_update_attributes.rb → cloud_workload_security_agent_rule_action_set_value.rb} +5 -4
  109. data/lib/datadog_api_client/v2/models/{dora_fetch_response.rb → create_attachment_request.rb} +5 -5
  110. data/lib/datadog_api_client/v2/models/{incident_attachment_update_data.rb → create_attachment_request_data.rb} +6 -6
  111. data/lib/datadog_api_client/v2/models/create_attachment_request_data_attributes.rb +115 -0
  112. data/lib/datadog_api_client/v2/models/create_attachment_request_data_attributes_attachment.rb +115 -0
  113. data/lib/datadog_api_client/v2/models/create_case_request_data.rb +1 -11
  114. data/lib/datadog_api_client/v2/models/create_case_request_data_attributes.rb +3 -3
  115. data/lib/datadog_api_client/v2/models/create_email_notification_channel_config.rb +167 -0
  116. data/lib/datadog_api_client/v2/models/create_jira_issue_request_array.rb +3 -15
  117. data/lib/datadog_api_client/v2/models/create_jira_issue_request_data.rb +1 -11
  118. data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes.rb +43 -3
  119. data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships.rb +35 -14
  120. data/lib/datadog_api_client/v2/models/create_notification_channel_attributes.rb +105 -0
  121. data/lib/datadog_api_client/v2/models/{create_jira_issue_request_array_included.rb → create_notification_channel_config.rb} +4 -5
  122. data/lib/datadog_api_client/v2/models/create_notification_channel_data.rb +133 -0
  123. data/lib/datadog_api_client/v2/models/{incident_attachment_update_request.rb → create_on_call_notification_rule_request.rb} +6 -11
  124. data/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request_data.rb +143 -0
  125. data/lib/datadog_api_client/v2/models/{incident_attachment_link_attributes_attachment_object.rb → create_phone_notification_channel_config.rb} +30 -30
  126. data/lib/datadog_api_client/v2/models/create_user_notification_channel_request.rb +123 -0
  127. data/lib/datadog_api_client/v2/models/custom_attribute_type.rb +1 -0
  128. data/lib/datadog_api_client/v2/models/data_export_config.rb +145 -0
  129. data/lib/datadog_api_client/v2/models/deployment_gate_rules_response.rb +105 -0
  130. data/lib/datadog_api_client/v2/models/detach_case_request_data.rb +1 -11
  131. data/lib/datadog_api_client/v2/models/dora_deployment_fetch_response.rb +105 -0
  132. data/lib/datadog_api_client/v2/models/dora_deployment_object.rb +125 -0
  133. data/lib/datadog_api_client/v2/models/dora_deployment_object_attributes.rb +225 -0
  134. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
  135. data/lib/datadog_api_client/v2/models/dora_deployments_list_response.rb +107 -0
  136. data/lib/datadog_api_client/v2/models/dora_failure_fetch_response.rb +105 -0
  137. data/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb +1 -1
  138. data/lib/datadog_api_client/v2/models/{dora_list_response.rb → dora_failures_list_response.rb} +5 -5
  139. data/lib/datadog_api_client/v2/models/{dora_event.rb → dora_incident_object.rb} +8 -8
  140. data/lib/datadog_api_client/v2/models/dora_incident_object_attributes.rb +225 -0
  141. data/lib/datadog_api_client/v2/models/event_payload.rb +26 -1
  142. data/lib/datadog_api_client/v2/models/finding_case_response_data.rb +1 -1
  143. data/lib/datadog_api_client/v2/models/finding_data.rb +1 -1
  144. data/lib/datadog_api_client/v2/models/finding_jira_issue.rb +2 -2
  145. data/lib/datadog_api_client/v2/models/finding_jira_issue_result.rb +4 -4
  146. data/lib/datadog_api_client/v2/models/get_suppression_version_history_data.rb +125 -0
  147. data/lib/datadog_api_client/v2/models/{incident_attachment_postmortem_attachment_type.rb → get_suppression_version_history_data_type.rb} +3 -3
  148. data/lib/datadog_api_client/v2/models/get_suppression_version_history_response.rb +105 -0
  149. data/lib/datadog_api_client/v2/models/global_variable_data.rb +125 -0
  150. data/lib/datadog_api_client/v2/models/global_variable_json_patch_request.rb +123 -0
  151. data/lib/datadog_api_client/v2/models/global_variable_json_patch_request_data.rb +115 -0
  152. data/lib/datadog_api_client/v2/models/global_variable_json_patch_request_data_attributes.rb +107 -0
  153. data/lib/datadog_api_client/v2/models/global_variable_json_patch_type.rb +26 -0
  154. data/lib/datadog_api_client/v2/models/global_variable_response.rb +105 -0
  155. data/lib/datadog_api_client/v2/models/{incident_attachment_link_attachment_type.rb → global_variable_type.rb} +3 -3
  156. data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +1 -1
  157. data/lib/datadog_api_client/v2/models/json_patch_operation.rb +154 -0
  158. data/lib/datadog_api_client/v2/models/json_patch_operation_op.rb +31 -0
  159. data/lib/datadog_api_client/v2/models/library.rb +13 -1
  160. data/lib/datadog_api_client/v2/models/list_deployment_rule_response_data.rb +165 -0
  161. data/lib/datadog_api_client/v2/models/list_deployment_rules_data_type.rb +26 -0
  162. data/lib/datadog_api_client/v2/models/list_deployment_rules_response_data_attributes.rb +107 -0
  163. data/lib/datadog_api_client/v2/models/list_notification_channels_response.rb +107 -0
  164. data/lib/datadog_api_client/v2/models/list_on_call_notification_rules_response.rb +119 -0
  165. data/lib/datadog_api_client/v2/models/notification_channel.rb +105 -0
  166. data/lib/datadog_api_client/v2/models/notification_channel_attributes.rb +115 -0
  167. data/lib/datadog_api_client/v2/models/notification_channel_config.rb +64 -0
  168. data/lib/datadog_api_client/v2/models/notification_channel_data.rb +143 -0
  169. data/lib/datadog_api_client/v2/models/{incident_attachment_link_attributes.rb → notification_channel_email_config.rb} +50 -37
  170. data/lib/datadog_api_client/v2/models/notification_channel_email_config_type.rb +26 -0
  171. data/lib/datadog_api_client/v2/models/notification_channel_email_format_type.rb +27 -0
  172. data/lib/datadog_api_client/v2/models/notification_channel_phone_config.rb +225 -0
  173. data/lib/datadog_api_client/v2/models/notification_channel_phone_config_type.rb +26 -0
  174. data/lib/datadog_api_client/v2/models/notification_channel_push_config.rb +165 -0
  175. data/lib/datadog_api_client/v2/models/notification_channel_push_config_type.rb +26 -0
  176. data/lib/datadog_api_client/v2/models/notification_channel_type.rb +26 -0
  177. data/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb +32 -24
  178. data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +32 -24
  179. data/lib/datadog_api_client/v2/models/observability_pipeline_config.rb +2 -2
  180. data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb +221 -0
  181. data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb +32 -24
  182. data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_remap.rb +1 -12
  183. data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb +32 -24
  184. data/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb +32 -24
  185. data/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb +32 -24
  186. data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +32 -24
  187. data/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb +34 -48
  188. data/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb +32 -24
  189. data/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb +32 -24
  190. data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +32 -24
  191. data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +28 -31
  192. data/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb +32 -24
  193. data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +32 -24
  194. data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +32 -24
  195. data/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb +32 -24
  196. data/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb +32 -24
  197. data/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb +32 -24
  198. data/lib/datadog_api_client/v2/models/{incident_attachment_update_response.rb → on_call_notification_rule.rb} +8 -11
  199. data/lib/datadog_api_client/v2/models/on_call_notification_rule_attributes.rb +125 -0
  200. data/lib/datadog_api_client/v2/models/on_call_notification_rule_category.rb +27 -0
  201. data/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship.rb +123 -0
  202. data/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship_data.rb +115 -0
  203. data/lib/datadog_api_client/v2/models/{incident_attachment_attributes.rb → on_call_notification_rule_channel_settings.rb} +3 -4
  204. data/lib/datadog_api_client/v2/models/on_call_notification_rule_data.rb +153 -0
  205. data/lib/datadog_api_client/v2/models/on_call_notification_rule_relationships.rb +105 -0
  206. data/lib/datadog_api_client/v2/models/on_call_notification_rule_request_attributes.rb +125 -0
  207. data/lib/datadog_api_client/v2/models/on_call_notification_rule_type.rb +26 -0
  208. data/lib/datadog_api_client/v2/models/on_call_notification_rules_included.rb +62 -0
  209. data/lib/datadog_api_client/v2/models/on_call_phone_notification_rule_method.rb +27 -0
  210. data/lib/datadog_api_client/v2/models/{incident_attachments_postmortem_attributes_attachment_object.rb → on_call_phone_notification_rule_settings.rb} +30 -30
  211. data/lib/datadog_api_client/v2/models/patch_attachment_request.rb +105 -0
  212. data/lib/datadog_api_client/v2/models/patch_attachment_request_data.rb +143 -0
  213. data/lib/datadog_api_client/v2/models/patch_attachment_request_data_attributes.rb +105 -0
  214. data/lib/datadog_api_client/v2/models/patch_attachment_request_data_attributes_attachment.rb +115 -0
  215. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_error.rb +125 -0
  216. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_errors.rb +107 -0
  217. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item.rb +195 -0
  218. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_account.rb +123 -0
  219. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_application.rb +124 -0
  220. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_event.rb +123 -0
  221. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_session.rb +123 -0
  222. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_type.rb +26 -0
  223. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_usr.rb +123 -0
  224. data/lib/datadog_api_client/v2/models/rule_versions.rb +1 -1
  225. data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options.rb +155 -0
  226. data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_bucket_duration.rb +32 -0
  227. data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_detection_tolerance.rb +31 -0
  228. data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_learning_duration.rb +32 -0
  229. data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +11 -1
  230. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
  231. data/lib/datadog_api_client/v2/models/service_list.rb +105 -0
  232. data/lib/datadog_api_client/v2/models/service_list_data.rb +143 -0
  233. data/lib/datadog_api_client/v2/models/service_list_data_attributes.rb +119 -0
  234. data/lib/datadog_api_client/v2/models/service_list_data_attributes_metadata_items.rb +115 -0
  235. data/lib/datadog_api_client/v2/models/service_list_data_type.rb +26 -0
  236. data/lib/datadog_api_client/v2/models/suppression_version_history.rb +133 -0
  237. data/lib/datadog_api_client/v2/models/suppression_versions.rb +117 -0
  238. data/lib/datadog_api_client/v2/models/synthetics_global_variable.rb +248 -0
  239. data/lib/datadog_api_client/v2/models/synthetics_global_variable_attributes.rb +107 -0
  240. data/lib/datadog_api_client/v2/models/synthetics_global_variable_options.rb +105 -0
  241. data/lib/datadog_api_client/v2/models/synthetics_global_variable_parse_test_options.rb +153 -0
  242. data/lib/datadog_api_client/v2/models/synthetics_global_variable_parse_test_options_type.rb +29 -0
  243. data/lib/datadog_api_client/v2/models/synthetics_global_variable_parser_type.rb +29 -0
  244. data/lib/datadog_api_client/v2/models/{incident_attachment_postmortem_attributes.rb → synthetics_global_variable_totp_parameters.rb} +38 -30
  245. data/lib/datadog_api_client/v2/models/synthetics_global_variable_value.rb +126 -0
  246. data/lib/datadog_api_client/v2/models/synthetics_variable_parser.rb +133 -0
  247. data/lib/datadog_api_client/v2/models/team_notification_rule.rb +154 -0
  248. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes.rb +135 -0
  249. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_email.rb +105 -0
  250. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_ms_teams.rb +105 -0
  251. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_pagerduty.rb +105 -0
  252. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_slack.rb +115 -0
  253. data/lib/datadog_api_client/v2/models/team_notification_rule_request.rb +123 -0
  254. data/lib/datadog_api_client/v2/models/team_notification_rule_response.rb +105 -0
  255. data/lib/datadog_api_client/v2/models/team_notification_rule_type.rb +26 -0
  256. data/lib/datadog_api_client/v2/models/team_notification_rules_response.rb +117 -0
  257. data/lib/datadog_api_client/v2/models/team_notification_rules_response_meta.rb +105 -0
  258. data/lib/datadog_api_client/v2/models/team_notification_rules_response_meta_page.rb +184 -0
  259. data/lib/datadog_api_client/v2/models/threat_hunting_job_options.rb +11 -1
  260. data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request.rb +123 -0
  261. data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_attributes.rb +125 -0
  262. data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_data.rb +153 -0
  263. data/lib/datadog_api_client/v2/models/user140420082644000.rb +143 -0
  264. data/lib/datadog_api_client/v2/models/{incident_attachment_related_object.rb → user_type.rb} +2 -2
  265. data/lib/datadog_api_client/v2/models/{rule_version_update.rb → version_history_update.rb} +3 -3
  266. data/lib/datadog_api_client/v2/models/{rule_version_update_type.rb → version_history_update_type.rb} +1 -1
  267. data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +11 -1
  268. data/lib/datadog_api_client/v2/models/vulnerability_ecosystem.rb +6 -1
  269. data/lib/datadog_api_client/v2/models/vulnerability_tool.rb +1 -0
  270. data/lib/datadog_api_client/version.rb +1 -1
  271. metadata +163 -32
  272. data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +0 -11
  273. data/examples/v2/incidents/UpdateIncidentAttachments.rb +0 -38
  274. data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +0 -26
  275. data/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb +0 -56
  276. data/examples/v2/security-monitoring/CreateJiraIssues_829823123.rb +0 -64
@@ -0,0 +1,62 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Represents additional included resources for a on-call notification rules
21
+ module OnCallNotificationRulesIncluded
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'NotificationChannelData'
30
+ ]
31
+ end
32
+ # Builds the object
33
+ # @param data [Mixed] Data to be matched against the list of oneOf items
34
+ # @return [Object] Returns the model or the data itself
35
+ def build(data)
36
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
37
+ # Note:
38
+ # - We do not attempt to check whether exactly one item matches.
39
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
40
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
41
+ # - TODO: scalar values are de facto behaving as if they were nullable.
42
+ # - TODO: logging when debugging is set.
43
+ openapi_one_of.each do |klass|
44
+ begin
45
+ next if klass == :AnyType # "nullable: true"
46
+ typed_data = find_and_cast_into_type(klass, data)
47
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
48
+ return typed_data if typed_data
49
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
50
+ end
51
+ end
52
+
53
+ if openapi_one_of.include?(:AnyType)
54
+ data
55
+ else
56
+ self._unparsed = true
57
+ DatadogAPIClient::UnparsedObject.new(data)
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,27 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Specifies the method in which a phone is used in a notification rule
21
+ class OnCallPhoneNotificationRuleMethod
22
+ include BaseEnumModel
23
+
24
+ SMS = "sms".freeze
25
+ VOICE = "voice".freeze
26
+ end
27
+ end
@@ -17,15 +17,15 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # The postmortem attachment.
21
- class IncidentAttachmentsPostmortemAttributesAttachmentObject
20
+ # Configuration for using a phone notification channel in a notification rule
21
+ class OnCallPhoneNotificationRuleSettings
22
22
  include BaseGenericModel
23
23
 
24
- # The URL of this notebook attachment.
25
- attr_reader :document_url
24
+ # Specifies the method in which a phone is used in a notification rule
25
+ attr_reader :method
26
26
 
27
- # The title of this postmortem attachment.
28
- attr_reader :title
27
+ # Indicates that the notification channel is a phone
28
+ attr_reader :type
29
29
 
30
30
  attr_accessor :additional_properties
31
31
 
@@ -33,8 +33,8 @@ module DatadogAPIClient::V2
33
33
  # @!visibility private
34
34
  def self.attribute_map
35
35
  {
36
- :'document_url' => :'documentUrl',
37
- :'title' => :'title'
36
+ :'method' => :'method',
37
+ :'type' => :'type'
38
38
  }
39
39
  end
40
40
 
@@ -42,8 +42,8 @@ module DatadogAPIClient::V2
42
42
  # @!visibility private
43
43
  def self.openapi_types
44
44
  {
45
- :'document_url' => :'String',
46
- :'title' => :'String'
45
+ :'method' => :'OnCallPhoneNotificationRuleMethod',
46
+ :'type' => :'NotificationChannelPhoneConfigType'
47
47
  }
48
48
  end
49
49
 
@@ -52,7 +52,7 @@ module DatadogAPIClient::V2
52
52
  # @!visibility private
53
53
  def initialize(attributes = {})
54
54
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentsPostmortemAttributesAttachmentObject` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPhoneNotificationRuleSettings` initialize method"
56
56
  end
57
57
 
58
58
  self.additional_properties = {}
@@ -65,12 +65,12 @@ module DatadogAPIClient::V2
65
65
  end
66
66
  }
67
67
 
68
- if attributes.key?(:'document_url')
69
- self.document_url = attributes[:'document_url']
68
+ if attributes.key?(:'method')
69
+ self.method = attributes[:'method']
70
70
  end
71
71
 
72
- if attributes.key?(:'title')
73
- self.title = attributes[:'title']
72
+ if attributes.key?(:'type')
73
+ self.type = attributes[:'type']
74
74
  end
75
75
  end
76
76
 
@@ -78,29 +78,29 @@ module DatadogAPIClient::V2
78
78
  # @return true if the model is valid
79
79
  # @!visibility private
80
80
  def valid?
81
- return false if @document_url.nil?
82
- return false if @title.nil?
81
+ return false if @method.nil?
82
+ return false if @type.nil?
83
83
  true
84
84
  end
85
85
 
86
86
  # Custom attribute writer method with validation
87
- # @param document_url [Object] Object to be assigned
87
+ # @param method [Object] Object to be assigned
88
88
  # @!visibility private
89
- def document_url=(document_url)
90
- if document_url.nil?
91
- fail ArgumentError, 'invalid value for "document_url", document_url cannot be nil.'
89
+ def method=(method)
90
+ if method.nil?
91
+ fail ArgumentError, 'invalid value for "method", method cannot be nil.'
92
92
  end
93
- @document_url = document_url
93
+ @method = method
94
94
  end
95
95
 
96
96
  # Custom attribute writer method with validation
97
- # @param title [Object] Object to be assigned
97
+ # @param type [Object] Object to be assigned
98
98
  # @!visibility private
99
- def title=(title)
100
- if title.nil?
101
- fail ArgumentError, 'invalid value for "title", title cannot be nil.'
99
+ def type=(type)
100
+ if type.nil?
101
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
102
102
  end
103
- @title = title
103
+ @type = type
104
104
  end
105
105
 
106
106
  # Returns the object in the form of hash, with additionalProperties support.
@@ -129,8 +129,8 @@ module DatadogAPIClient::V2
129
129
  def ==(o)
130
130
  return true if self.equal?(o)
131
131
  self.class == o.class &&
132
- document_url == o.document_url &&
133
- title == o.title &&
132
+ method == o.method &&
133
+ type == o.type &&
134
134
  additional_properties == o.additional_properties
135
135
  end
136
136
 
@@ -138,7 +138,7 @@ module DatadogAPIClient::V2
138
138
  # @return [Integer] Hash code
139
139
  # @!visibility private
140
140
  def hash
141
- [document_url, title, additional_properties].hash
141
+ [method, type, additional_properties].hash
142
142
  end
143
143
  end
144
144
  end
@@ -0,0 +1,105 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ #
21
+ class PatchAttachmentRequest
22
+ include BaseGenericModel
23
+
24
+ #
25
+ attr_accessor :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'PatchAttachmentRequestData'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchAttachmentRequest` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Returns the object in the form of hash, with additionalProperties support.
69
+ # @return [Hash] Returns the object in the form of hash
70
+ # @!visibility private
71
+ def to_hash
72
+ hash = {}
73
+ self.class.attribute_map.each_pair do |attr, param|
74
+ value = self.send(attr)
75
+ if value.nil?
76
+ is_nullable = self.class.openapi_nullable.include?(attr)
77
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78
+ end
79
+
80
+ hash[param] = _to_hash(value)
81
+ end
82
+ self.additional_properties.each_pair do |attr, value|
83
+ hash[attr] = value
84
+ end
85
+ hash
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ data == o.data &&
95
+ additional_properties == o.additional_properties
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ # @!visibility private
101
+ def hash
102
+ [data, additional_properties].hash
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,143 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ #
21
+ class PatchAttachmentRequestData
22
+ include BaseGenericModel
23
+
24
+ #
25
+ attr_accessor :attributes
26
+
27
+ #
28
+ attr_accessor :id
29
+
30
+ # The incident attachment resource type.
31
+ attr_reader :type
32
+
33
+ attr_accessor :additional_properties
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ # @!visibility private
37
+ def self.attribute_map
38
+ {
39
+ :'attributes' => :'attributes',
40
+ :'id' => :'id',
41
+ :'type' => :'type'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'attributes' => :'PatchAttachmentRequestDataAttributes',
50
+ :'id' => :'String',
51
+ :'type' => :'IncidentAttachmentType'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param attributes [Hash] Model attributes in the form of hash
57
+ # @!visibility private
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchAttachmentRequestData` initialize method"
61
+ end
62
+
63
+ self.additional_properties = {}
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ self.additional_properties[k.to_sym] = v
68
+ else
69
+ h[k.to_sym] = v
70
+ end
71
+ }
72
+
73
+ if attributes.key?(:'attributes')
74
+ self.attributes = attributes[:'attributes']
75
+ end
76
+
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
79
+ end
80
+
81
+ if attributes.key?(:'type')
82
+ self.type = attributes[:'type']
83
+ end
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ # @!visibility private
89
+ def valid?
90
+ return false if @type.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param type [Object] Object to be assigned
96
+ # @!visibility private
97
+ def type=(type)
98
+ if type.nil?
99
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
100
+ end
101
+ @type = type
102
+ end
103
+
104
+ # Returns the object in the form of hash, with additionalProperties support.
105
+ # @return [Hash] Returns the object in the form of hash
106
+ # @!visibility private
107
+ def to_hash
108
+ hash = {}
109
+ self.class.attribute_map.each_pair do |attr, param|
110
+ value = self.send(attr)
111
+ if value.nil?
112
+ is_nullable = self.class.openapi_nullable.include?(attr)
113
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
114
+ end
115
+
116
+ hash[param] = _to_hash(value)
117
+ end
118
+ self.additional_properties.each_pair do |attr, value|
119
+ hash[attr] = value
120
+ end
121
+ hash
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param o [Object] Object to be compared
126
+ # @!visibility private
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ attributes == o.attributes &&
131
+ id == o.id &&
132
+ type == o.type &&
133
+ additional_properties == o.additional_properties
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ # @!visibility private
139
+ def hash
140
+ [attributes, id, type, additional_properties].hash
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,105 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ #
21
+ class PatchAttachmentRequestDataAttributes
22
+ include BaseGenericModel
23
+
24
+ #
25
+ attr_accessor :attachment
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'attachment' => :'attachment'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'attachment' => :'PatchAttachmentRequestDataAttributesAttachment'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchAttachmentRequestDataAttributes` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'attachment')
64
+ self.attachment = attributes[:'attachment']
65
+ end
66
+ end
67
+
68
+ # Returns the object in the form of hash, with additionalProperties support.
69
+ # @return [Hash] Returns the object in the form of hash
70
+ # @!visibility private
71
+ def to_hash
72
+ hash = {}
73
+ self.class.attribute_map.each_pair do |attr, param|
74
+ value = self.send(attr)
75
+ if value.nil?
76
+ is_nullable = self.class.openapi_nullable.include?(attr)
77
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78
+ end
79
+
80
+ hash[param] = _to_hash(value)
81
+ end
82
+ self.additional_properties.each_pair do |attr, value|
83
+ hash[attr] = value
84
+ end
85
+ hash
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ attachment == o.attachment &&
95
+ additional_properties == o.additional_properties
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ # @!visibility private
101
+ def hash
102
+ [attachment, additional_properties].hash
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,115 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ #
21
+ class PatchAttachmentRequestDataAttributesAttachment
22
+ include BaseGenericModel
23
+
24
+ #
25
+ attr_accessor :document_url
26
+
27
+ #
28
+ attr_accessor :title
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'document_url' => :'documentUrl',
37
+ :'title' => :'title'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'document_url' => :'String',
46
+ :'title' => :'String'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PatchAttachmentRequestDataAttributesAttachment` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'document_url')
69
+ self.document_url = attributes[:'document_url']
70
+ end
71
+
72
+ if attributes.key?(:'title')
73
+ self.title = attributes[:'title']
74
+ end
75
+ end
76
+
77
+ # Returns the object in the form of hash, with additionalProperties support.
78
+ # @return [Hash] Returns the object in the form of hash
79
+ # @!visibility private
80
+ def to_hash
81
+ hash = {}
82
+ self.class.attribute_map.each_pair do |attr, param|
83
+ value = self.send(attr)
84
+ if value.nil?
85
+ is_nullable = self.class.openapi_nullable.include?(attr)
86
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
87
+ end
88
+
89
+ hash[param] = _to_hash(value)
90
+ end
91
+ self.additional_properties.each_pair do |attr, value|
92
+ hash[attr] = value
93
+ end
94
+ hash
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param o [Object] Object to be compared
99
+ # @!visibility private
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ document_url == o.document_url &&
104
+ title == o.title &&
105
+ additional_properties == o.additional_properties
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Integer] Hash code
110
+ # @!visibility private
111
+ def hash
112
+ [document_url, title, additional_properties].hash
113
+ end
114
+ end
115
+ end