datadog_api_client 2.20.0 → 2.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +5 -0
  4. data/.generator/schemas/v1/openapi.yaml +502 -754
  5. data/.generator/schemas/v2/openapi.yaml +2903 -102
  6. data/.github/workflows/prepare_release.yml +2 -2
  7. data/.github/workflows/publish.yml +2 -2
  8. data/.github/workflows/release.yml +2 -2
  9. data/.github/workflows/test.yml +1 -1
  10. data/CHANGELOG.md +52 -0
  11. data/Gemfile +1 -1
  12. data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
  13. data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -0
  14. data/examples/v1/aws-integration/UpdateAWSAccount.rb +1 -1
  15. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
  16. data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +118 -0
  18. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
  19. data/examples/v1/synthetics/UpdateBrowserTest.rb +4 -0
  20. data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +2 -2
  21. data/examples/v2/authn-mappings/CreateAuthNMapping.rb +1 -1
  22. data/examples/v2/authn-mappings/UpdateAuthNMapping.rb +1 -1
  23. data/examples/v2/case-management/ArchiveCase.rb +14 -0
  24. data/examples/v2/case-management/AssignCase.rb +20 -0
  25. data/examples/v2/case-management/CreateCase.rb +33 -0
  26. data/examples/v2/case-management/CreateProject.rb +15 -0
  27. data/examples/v2/case-management/DeleteProject.rb +5 -0
  28. data/examples/v2/case-management/GetCase.rb +8 -0
  29. data/examples/v2/case-management/GetProject.rb +5 -0
  30. data/examples/v2/case-management/GetProjects.rb +5 -0
  31. data/examples/v2/case-management/SearchCases.rb +5 -0
  32. data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
  33. data/examples/v2/case-management/UnarchiveCase.rb +14 -0
  34. data/examples/v2/case-management/UnassignCase.rb +14 -0
  35. data/examples/v2/case-management/UpdatePriority.rb +17 -0
  36. data/examples/v2/case-management/UpdateStatus.rb +17 -0
  37. data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
  38. data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
  39. data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
  40. data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
  41. data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
  42. data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
  43. data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
  44. data/examples/v2/gcp-integration/CreateGCPSTSAccount.rb +1 -1
  45. data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +1 -1
  46. data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +1 -1
  47. data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
  48. data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -1
  49. data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +1 -1
  50. data/examples/v2/gcp-integration/UpdateGCPSTSAccount.rb +1 -1
  51. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
  52. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +1 -1
  53. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
  54. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
  55. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
  56. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
  57. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
  58. data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
  59. data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
  60. data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
  61. data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +22 -0
  62. data/examples/v2/metrics/ListMetricAssets.rb +5 -0
  63. data/examples/v2/metrics/QueryScalarData_3112571352.rb +2 -2
  64. data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +3 -3
  65. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +19 -0
  66. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +42 -0
  67. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +4 -0
  68. data/examples/v2/service-level-objectives/CreateSLOReportJob.rb +20 -0
  69. data/examples/v2/service-level-objectives/GetSLOReport.rb +8 -0
  70. data/examples/v2/service-level-objectives/GetSLOReportJobStatus.rb +11 -0
  71. data/lib/datadog_api_client/configuration.rb +3 -0
  72. data/lib/datadog_api_client/inflector.rb +132 -7
  73. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
  74. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +104 -131
  75. data/lib/datadog_api_client/v1/models/aws_account.rb +12 -2
  76. data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
  77. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +8 -0
  78. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
  79. data/lib/datadog_api_client/v1/models/monitor_options.rb +4 -1
  80. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +12 -0
  81. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +124 -4
  82. data/lib/datadog_api_client/v1/models/series.rb +1 -1
  83. data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +14 -2
  84. data/lib/datadog_api_client/v1/models/slo_time_slice_interval.rb +29 -0
  85. data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +1 -1
  86. data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
  87. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +23 -1
  88. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +175 -0
  89. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +2 -0
  90. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  91. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
  92. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
  93. data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +6 -0
  94. data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
  95. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
  96. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
  97. data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
  98. data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
  99. data/lib/datadog_api_client/v2/api/metrics_api.rb +70 -2
  100. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +67 -0
  101. data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
  102. data/lib/datadog_api_client/v2/api/service_level_objectives_api.rb +245 -0
  103. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +15 -6
  104. data/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb +1 -1
  105. data/lib/datadog_api_client/v2/models/authn_mapping_create_relationships.rb +37 -54
  106. data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +2 -1
  107. data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb +98 -0
  108. data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb +98 -0
  109. data/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb +14 -4
  110. data/lib/datadog_api_client/v2/models/authn_mapping_team.rb +100 -0
  111. data/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb +212 -0
  112. data/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb +1 -1
  113. data/lib/datadog_api_client/v2/models/authn_mapping_update_relationships.rb +37 -54
  114. data/lib/datadog_api_client/v2/models/case.rb +150 -0
  115. data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
  116. data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
  117. data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
  118. data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
  119. data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
  120. data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
  121. data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
  122. data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
  123. data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
  124. data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
  125. data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
  126. data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
  127. data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
  128. data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
  129. data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
  130. data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
  131. data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
  132. data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
  133. data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
  134. data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
  135. data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
  136. data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
  137. data/lib/datadog_api_client/{v1/models/usage_attribution_pagination.rb → v2/models/case_update_status_attributes.rb} +29 -51
  138. data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
  139. data/lib/datadog_api_client/{v1/models/usage_attribution_metadata.rb → v2/models/cases_response.rb} +22 -22
  140. data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
  141. data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
  142. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
  143. data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
  144. data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
  145. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
  146. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
  147. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
  148. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
  149. data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
  150. data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
  151. data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
  152. data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
  153. data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
  154. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
  155. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
  156. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
  157. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
  158. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
  159. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
  160. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
  161. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
  162. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
  163. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
  164. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
  165. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
  166. data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
  167. data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
  168. data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
  169. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
  170. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
  171. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
  172. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
  173. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
  174. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
  175. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
  176. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
  177. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
  178. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
  179. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
  180. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
  181. data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
  182. data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
  183. data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
  184. data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
  185. data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
  186. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
  187. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +21 -20
  188. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
  189. data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
  190. data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
  191. data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
  192. data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
  193. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
  194. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
  195. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
  196. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
  197. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
  198. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
  199. data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
  200. data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
  201. data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
  202. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
  203. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
  204. data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
  205. data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
  206. data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
  207. data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
  208. data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
  209. data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
  210. data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
  211. data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
  212. data/lib/datadog_api_client/v2/models/metric_series.rb +1 -1
  213. data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
  214. data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
  215. data/lib/datadog_api_client/{v1/models/usage_attribution_response.rb → v2/models/nullable_user_relationship.rb} +22 -26
  216. data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
  217. data/lib/datadog_api_client/v2/models/project.rb +150 -0
  218. data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
  219. data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
  220. data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
  221. data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
  222. data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
  223. data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
  224. data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
  225. data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
  226. data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
  227. data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
  228. data/lib/datadog_api_client/v2/models/relationship_to_team.rb +80 -0
  229. data/lib/datadog_api_client/v2/models/relationship_to_team_data.rb +90 -0
  230. data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +183 -0
  231. data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +1 -1
  232. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
  233. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +1 -1
  234. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +1 -1
  235. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
  236. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +1 -1
  237. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +11 -1
  238. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +13 -14
  239. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +11 -1
  240. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
  241. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +13 -1
  242. data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
  243. data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
  244. data/lib/datadog_api_client/v2/models/slo_report_create_request.rb +98 -0
  245. data/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb +160 -0
  246. data/lib/datadog_api_client/v2/models/slo_report_create_request_data.rb +98 -0
  247. data/lib/datadog_api_client/v2/models/slo_report_interval.rb +27 -0
  248. data/lib/datadog_api_client/v2/models/slo_report_post_response.rb +80 -0
  249. data/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb +90 -0
  250. data/lib/datadog_api_client/v2/models/slo_report_status.rb +29 -0
  251. data/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb +80 -0
  252. data/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb +80 -0
  253. data/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb +100 -0
  254. data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +8 -0
  255. data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
  256. data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
  257. data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
  258. data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
  259. data/lib/datadog_api_client/v2/models/user_teams_response.rb +13 -1
  260. data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
  261. data/lib/datadog_api_client/version.rb +1 -1
  262. metadata +196 -33
  263. data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -9
  264. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +0 -152
  265. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +0 -61
  266. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +0 -72
  267. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +0 -590
@@ -0,0 +1,245 @@
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 'cgi'
17
+
18
+ module DatadogAPIClient::V2
19
+ class ServiceLevelObjectivesAPI
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
23
+ @api_client = api_client
24
+ end
25
+
26
+ # Create a new SLO report.
27
+ #
28
+ # @see #create_slo_report_job_with_http_info
29
+ def create_slo_report_job(body, opts = {})
30
+ data, _status_code, _headers = create_slo_report_job_with_http_info(body, opts)
31
+ data
32
+ end
33
+
34
+ # Create a new SLO report.
35
+ #
36
+ # Create a job to generate an SLO report. The report job is processed asynchronously and eventually results in a CSV report being available for download.
37
+ #
38
+ # Check the status of the job and download the CSV report using the returned `report_id`.
39
+ #
40
+ # @param body [SloReportCreateRequest] Create SLO report job request body.
41
+ # @param opts [Hash] the optional parameters
42
+ # @return [Array<(SLOReportPostResponse, Integer, Hash)>] SLOReportPostResponse data, response status code and response headers
43
+ def create_slo_report_job_with_http_info(body, opts = {})
44
+ unstable_enabled = @api_client.config.unstable_operations["v2.create_slo_report_job".to_sym]
45
+ if unstable_enabled
46
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_slo_report_job")
47
+ else
48
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_slo_report_job"))
49
+ end
50
+
51
+ if @api_client.config.debugging
52
+ @api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.create_slo_report_job ...'
53
+ end
54
+ # verify the required parameter 'body' is set
55
+ if @api_client.config.client_side_validation && body.nil?
56
+ fail ArgumentError, "Missing the required parameter 'body' when calling ServiceLevelObjectivesAPI.create_slo_report_job"
57
+ end
58
+ # resource path
59
+ local_var_path = '/api/v2/slo/report'
60
+
61
+ # query parameters
62
+ query_params = opts[:query_params] || {}
63
+
64
+ # header parameters
65
+ header_params = opts[:header_params] || {}
66
+ # HTTP header 'Accept' (if needed)
67
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
68
+ # HTTP header 'Content-Type'
69
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
70
+
71
+ # form parameters
72
+ form_params = opts[:form_params] || {}
73
+
74
+ # http body (model)
75
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
76
+
77
+ # return_type
78
+ return_type = opts[:debug_return_type] || 'SLOReportPostResponse'
79
+
80
+ # auth_names
81
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
82
+
83
+ new_options = opts.merge(
84
+ :operation => :create_slo_report_job,
85
+ :header_params => header_params,
86
+ :query_params => query_params,
87
+ :form_params => form_params,
88
+ :body => post_body,
89
+ :auth_names => auth_names,
90
+ :return_type => return_type,
91
+ :api_version => "V2"
92
+ )
93
+
94
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug "API called: ServiceLevelObjectivesAPI#create_slo_report_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
97
+ end
98
+ return data, status_code, headers
99
+ end
100
+
101
+ # Get SLO report.
102
+ #
103
+ # @see #get_slo_report_with_http_info
104
+ def get_slo_report(report_id, opts = {})
105
+ data, _status_code, _headers = get_slo_report_with_http_info(report_id, opts)
106
+ data
107
+ end
108
+
109
+ # Get SLO report.
110
+ #
111
+ # Download an SLO report. This can only be performed after the report job has completed.
112
+ #
113
+ # Reports are not guaranteed to exist indefinitely. Datadog recommends that you download the report as soon as it is available.
114
+ #
115
+ # @param report_id [String] The ID of the report job.
116
+ # @param opts [Hash] the optional parameters
117
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
118
+ def get_slo_report_with_http_info(report_id, opts = {})
119
+ unstable_enabled = @api_client.config.unstable_operations["v2.get_slo_report".to_sym]
120
+ if unstable_enabled
121
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_slo_report")
122
+ else
123
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_slo_report"))
124
+ end
125
+
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.get_slo_report ...'
128
+ end
129
+ # verify the required parameter 'report_id' is set
130
+ if @api_client.config.client_side_validation && report_id.nil?
131
+ fail ArgumentError, "Missing the required parameter 'report_id' when calling ServiceLevelObjectivesAPI.get_slo_report"
132
+ end
133
+ # resource path
134
+ local_var_path = '/api/v2/slo/report/{report_id}/download'.sub('{report_id}', CGI.escape(report_id.to_s).gsub('%2F', '/'))
135
+
136
+ # query parameters
137
+ query_params = opts[:query_params] || {}
138
+
139
+ # header parameters
140
+ header_params = opts[:header_params] || {}
141
+ # HTTP header 'Accept' (if needed)
142
+ header_params['Accept'] = @api_client.select_header_accept(['text/csv', 'application/json'])
143
+
144
+ # form parameters
145
+ form_params = opts[:form_params] || {}
146
+
147
+ # http body (model)
148
+ post_body = opts[:debug_body]
149
+
150
+ # return_type
151
+ return_type = opts[:debug_return_type] || 'String'
152
+
153
+ # auth_names
154
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
155
+
156
+ new_options = opts.merge(
157
+ :operation => :get_slo_report,
158
+ :header_params => header_params,
159
+ :query_params => query_params,
160
+ :form_params => form_params,
161
+ :body => post_body,
162
+ :auth_names => auth_names,
163
+ :return_type => return_type,
164
+ :api_version => "V2"
165
+ )
166
+
167
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug "API called: ServiceLevelObjectivesAPI#get_slo_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
170
+ end
171
+ return data, status_code, headers
172
+ end
173
+
174
+ # Get SLO report status.
175
+ #
176
+ # @see #get_slo_report_job_status_with_http_info
177
+ def get_slo_report_job_status(report_id, opts = {})
178
+ data, _status_code, _headers = get_slo_report_job_status_with_http_info(report_id, opts)
179
+ data
180
+ end
181
+
182
+ # Get SLO report status.
183
+ #
184
+ # Get the status of the SLO report job.
185
+ #
186
+ # @param report_id [String] The ID of the report job.
187
+ # @param opts [Hash] the optional parameters
188
+ # @return [Array<(SLOReportStatusGetResponse, Integer, Hash)>] SLOReportStatusGetResponse data, response status code and response headers
189
+ def get_slo_report_job_status_with_http_info(report_id, opts = {})
190
+ unstable_enabled = @api_client.config.unstable_operations["v2.get_slo_report_job_status".to_sym]
191
+ if unstable_enabled
192
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_slo_report_job_status")
193
+ else
194
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_slo_report_job_status"))
195
+ end
196
+
197
+ if @api_client.config.debugging
198
+ @api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.get_slo_report_job_status ...'
199
+ end
200
+ # verify the required parameter 'report_id' is set
201
+ if @api_client.config.client_side_validation && report_id.nil?
202
+ fail ArgumentError, "Missing the required parameter 'report_id' when calling ServiceLevelObjectivesAPI.get_slo_report_job_status"
203
+ end
204
+ # resource path
205
+ local_var_path = '/api/v2/slo/report/{report_id}/status'.sub('{report_id}', CGI.escape(report_id.to_s).gsub('%2F', '/'))
206
+
207
+ # query parameters
208
+ query_params = opts[:query_params] || {}
209
+
210
+ # header parameters
211
+ header_params = opts[:header_params] || {}
212
+ # HTTP header 'Accept' (if needed)
213
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
214
+
215
+ # form parameters
216
+ form_params = opts[:form_params] || {}
217
+
218
+ # http body (model)
219
+ post_body = opts[:debug_body]
220
+
221
+ # return_type
222
+ return_type = opts[:debug_return_type] || 'SLOReportStatusGetResponse'
223
+
224
+ # auth_names
225
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
226
+
227
+ new_options = opts.merge(
228
+ :operation => :get_slo_report_job_status,
229
+ :header_params => header_params,
230
+ :query_params => query_params,
231
+ :form_params => form_params,
232
+ :body => post_body,
233
+ :auth_names => auth_names,
234
+ :return_type => return_type,
235
+ :api_version => "V2"
236
+ )
237
+
238
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug "API called: ServiceLevelObjectivesAPI#get_slo_report_job_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
241
+ end
242
+ return data, status_code, headers
243
+ end
244
+ end
245
+ end
@@ -33,7 +33,7 @@ module DatadogAPIClient::V2
33
33
 
34
34
  # Get active billing dimensions for cost attribution.
35
35
  #
36
- # Get active billing dimensions for cost attribution. Cost data for a given month becomes available no later than the 17th of the following month.
36
+ # Get active billing dimensions for cost attribution. Cost data for a given month becomes available no later than the 19th of the following month.
37
37
  #
38
38
  # @param opts [Hash] the optional parameters
39
39
  # @return [Array<(ActiveBillingDimensionsResponse, Integer, Hash)>] ActiveBillingDimensionsResponse data, response status code and response headers
@@ -321,7 +321,7 @@ module DatadogAPIClient::V2
321
321
  # Get hourly usage by product family.
322
322
  #
323
323
  # @param filter_timestamp_start [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
324
- # @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `netflow_monitoring`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, and `timeseries`. The following product family has been **deprecated**: `audit_logs`.
324
+ # @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, `cws`, `dbm`, `error_tracking`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `netflow_monitoring`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, and `timeseries`. The following product family has been **deprecated**: `audit_logs`.
325
325
  # @param opts [Hash] the optional parameters
326
326
  # @option opts [Time] :filter_timestamp_end Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour.
327
327
  # @option opts [Boolean] :filter_include_descendants Include child org usage in the response. Defaults to false.
@@ -409,7 +409,7 @@ module DatadogAPIClient::V2
409
409
  # Get Monthly Cost Attribution.
410
410
  #
411
411
  # Get monthly cost attribution by tag across multi-org and single root-org accounts.
412
- # Cost Attribution data for a given month becomes available no later than the 17th of the following month.
412
+ # Cost Attribution data for a given month becomes available no later than the 19th of the following month.
413
413
  # This API endpoint is paginated. To make sure you receive all records, check if the value of `next_record_id` is
414
414
  # set in the response. If it is, make another request and pass `next_record_id` as a parameter.
415
415
  # Pseudo code example:
@@ -584,13 +584,16 @@ module DatadogAPIClient::V2
584
584
  # Get hourly usage for application security.
585
585
  #
586
586
  # Get hourly usage for application security .
587
- # **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
587
+ # **Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
588
+ #
589
+ # @deprecated This API is deprecated.
588
590
  #
589
591
  # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
590
592
  # @param opts [Hash] the optional parameters
591
593
  # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
592
594
  # @return [Array<(UsageApplicationSecurityMonitoringResponse, Integer, Hash)>] UsageApplicationSecurityMonitoringResponse data, response status code and response headers
593
595
  def get_usage_application_security_monitoring_with_http_info(start_hr, opts = {})
596
+ warn "[DEPRECATION] `GetUsageApplicationSecurityMonitoring` is deprecated."
594
597
 
595
598
  if @api_client.config.debugging
596
599
  @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_application_security_monitoring ...'
@@ -653,13 +656,16 @@ module DatadogAPIClient::V2
653
656
  # Get hourly usage for Lambda traced invocations.
654
657
  #
655
658
  # Get hourly usage for Lambda traced invocations.
656
- # **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
659
+ # **Note:** This endpoint has been deprecated.. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
660
+ #
661
+ # @deprecated This API is deprecated.
657
662
  #
658
663
  # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
659
664
  # @param opts [Hash] the optional parameters
660
665
  # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
661
666
  # @return [Array<(UsageLambdaTracedInvocationsResponse, Integer, Hash)>] UsageLambdaTracedInvocationsResponse data, response status code and response headers
662
667
  def get_usage_lambda_traced_invocations_with_http_info(start_hr, opts = {})
668
+ warn "[DEPRECATION] `GetUsageLambdaTracedInvocations` is deprecated."
663
669
 
664
670
  if @api_client.config.debugging
665
671
  @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_lambda_traced_invocations ...'
@@ -722,13 +728,16 @@ module DatadogAPIClient::V2
722
728
  # Get hourly usage for observability pipelines.
723
729
  #
724
730
  # Get hourly usage for observability pipelines.
725
- # **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
731
+ # **Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)
732
+ #
733
+ # @deprecated This API is deprecated.
726
734
  #
727
735
  # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
728
736
  # @param opts [Hash] the optional parameters
729
737
  # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
730
738
  # @return [Array<(UsageObservabilityPipelinesResponse, Integer, Hash)>] UsageObservabilityPipelinesResponse data, response status code and response headers
731
739
  def get_usage_observability_pipelines_with_http_info(start_hr, opts = {})
740
+ warn "[DEPRECATION] `GetUsageObservabilityPipelines` is deprecated."
732
741
 
733
742
  if @api_client.config.debugging
734
743
  @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_observability_pipelines ...'
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Key/Value pair of attributes used for create request.
25
25
  attr_accessor :attributes
26
26
 
27
- # Relationship of AuthN Mapping create object to Role.
27
+ # Relationship of AuthN Mapping create object to a Role or Team.
28
28
  attr_accessor :relationships
29
29
 
30
30
  # AuthN Mappings resource type.
@@ -17,64 +17,47 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # Relationship of AuthN Mapping create object to Role.
21
- class AuthNMappingCreateRelationships
22
- include BaseGenericModel
23
-
24
- # Relationship to role.
25
- attr_accessor :role
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- # @!visibility private
29
- def self.attribute_map
30
- {
31
- :'role' => :'role'
32
- }
33
- end
34
-
35
- # Attribute type mapping.
36
- # @!visibility private
37
- def self.openapi_types
38
- {
39
- :'role' => :'RelationshipToRole'
40
- }
41
- end
42
-
43
- # Initializes the object
44
- # @param attributes [Hash] Model attributes in the form of hash
45
- # @!visibility private
46
- def initialize(attributes = {})
47
- if (!attributes.is_a?(Hash))
48
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingCreateRelationships` initialize method"
20
+ # Relationship of AuthN Mapping create object to a Role or Team.
21
+ module AuthNMappingCreateRelationships
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
+ :'AuthNMappingRelationshipToRole',
30
+ :'AuthNMappingRelationshipToTeam'
31
+ ]
49
32
  end
50
-
51
- # check to see if the attribute exists and convert string to symbol for hash key
52
- attributes = attributes.each_with_object({}) { |(k, v), h|
53
- if (!self.class.attribute_map.key?(k.to_sym))
54
- fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingCreateRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
33
+ # Builds the object
34
+ # @param data [Mixed] Data to be matched against the list of oneOf items
35
+ # @return [Object] Returns the model or the data itself
36
+ def build(data)
37
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
38
+ # Note:
39
+ # - We do not attempt to check whether exactly one item matches.
40
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
42
+ # - TODO: scalar values are de facto behaving as if they were nullable.
43
+ # - TODO: logging when debugging is set.
44
+ openapi_one_of.each do |klass|
45
+ begin
46
+ next if klass == :AnyType # "nullable: true"
47
+ typed_data = find_and_cast_into_type(klass, data)
48
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
49
+ return typed_data if typed_data
50
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
51
+ end
55
52
  end
56
- h[k.to_sym] = v
57
- }
58
53
 
59
- if attributes.key?(:'role')
60
- self.role = attributes[:'role']
54
+ if openapi_one_of.include?(:AnyType)
55
+ data
56
+ else
57
+ self._unparsed = true
58
+ DatadogAPIClient::UnparsedObject.new(data)
59
+ end
61
60
  end
62
61
  end
63
-
64
- # Checks equality by comparing each attribute.
65
- # @param o [Object] Object to be compared
66
- # @!visibility private
67
- def ==(o)
68
- return true if self.equal?(o)
69
- self.class == o.class &&
70
- role == o.role
71
- end
72
-
73
- # Calculates hash code according to all attributes.
74
- # @return [Integer] Hash code
75
- # @!visibility private
76
- def hash
77
- [role].hash
78
- end
79
62
  end
80
63
  end
@@ -27,7 +27,8 @@ module DatadogAPIClient::V2
27
27
  def openapi_one_of
28
28
  [
29
29
  :'SAMLAssertionAttribute',
30
- :'Role'
30
+ :'Role',
31
+ :'AuthNMappingTeam'
31
32
  ]
32
33
  end
33
34
  # Builds the object
@@ -0,0 +1,98 @@
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
+ # Relationship of AuthN Mapping to a Role.
21
+ class AuthNMappingRelationshipToRole
22
+ include BaseGenericModel
23
+
24
+ # Relationship to role.
25
+ attr_reader :role
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'role' => :'role'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'role' => :'RelationshipToRole'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingRelationshipToRole` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingRelationshipToRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'role')
60
+ self.role = attributes[:'role']
61
+ end
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ # @!visibility private
67
+ def valid?
68
+ return false if @role.nil?
69
+ true
70
+ end
71
+
72
+ # Custom attribute writer method with validation
73
+ # @param role [Object] Object to be assigned
74
+ # @!visibility private
75
+ def role=(role)
76
+ if role.nil?
77
+ fail ArgumentError, 'invalid value for "role", role cannot be nil.'
78
+ end
79
+ @role = role
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ role == o.role
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ # @!visibility private
94
+ def hash
95
+ [role].hash
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,98 @@
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
+ # Relationship of AuthN Mapping to a Team.
21
+ class AuthNMappingRelationshipToTeam
22
+ include BaseGenericModel
23
+
24
+ # Relationship to team.
25
+ attr_reader :team
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'team' => :'team'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'team' => :'RelationshipToTeam'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingRelationshipToTeam` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingRelationshipToTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'team')
60
+ self.team = attributes[:'team']
61
+ end
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ # @!visibility private
67
+ def valid?
68
+ return false if @team.nil?
69
+ true
70
+ end
71
+
72
+ # Custom attribute writer method with validation
73
+ # @param team [Object] Object to be assigned
74
+ # @!visibility private
75
+ def team=(team)
76
+ if team.nil?
77
+ fail ArgumentError, 'invalid value for "team", team cannot be nil.'
78
+ end
79
+ @team = team
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ team == o.team
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ # @!visibility private
94
+ def hash
95
+ [team].hash
96
+ end
97
+ end
98
+ end