datadog_api_client 2.8.0 → 2.9.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 (90) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +66 -5
  4. data/.generator/schemas/v2/openapi.yaml +860 -20
  5. data/.generator/src/generator/formatter.py +1 -0
  6. data/.generator/src/generator/templates/model_base.j2 +8 -4
  7. data/CHANGELOG.md +24 -0
  8. data/examples/v1/dashboards/CreateDashboard_2800096921.rb +62 -0
  9. data/examples/v1/dashboards/CreateDashboard_3195475781.rb +32 -0
  10. data/examples/v2/incidents/CreateIncidentIntegration.rb +31 -0
  11. data/examples/v2/incidents/DeleteIncidentIntegration.rb +14 -0
  12. data/examples/v2/incidents/GetIncidentIntegration.rb +14 -0
  13. data/examples/v2/incidents/ListIncidentIntegrations.rb +11 -0
  14. data/examples/v2/incidents/UpdateIncidentIntegration.rb +34 -0
  15. data/examples/v2/ip-allowlist/GetIPAllowlist.rb +5 -0
  16. data/examples/v2/ip-allowlist/UpdateIPAllowlist.rb +25 -0
  17. data/examples/v2/logs-metrics/CreateLogsMetric.rb +1 -1
  18. data/examples/v2/restriction-policies/DeleteRestrictionPolicy.rb +5 -0
  19. data/examples/v2/restriction-policies/GetRestrictionPolicy.rb +5 -0
  20. data/examples/v2/restriction-policies/UpdateRestrictionPolicy.rb +25 -0
  21. data/examples/v2/synthetics/GetOnDemandConcurrencyCap.rb +5 -0
  22. data/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.rb +5 -0
  23. data/examples/v2/synthetics/SetOnDemandConcurrencyCap.rb +7 -0
  24. data/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.rb +9 -0
  25. data/lib/datadog_api_client/configuration.rb +5 -0
  26. data/lib/datadog_api_client/inflector.rb +35 -0
  27. data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -2
  28. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  29. data/lib/datadog_api_client/v1/model_base.rb +7 -3
  30. data/lib/datadog_api_client/v1/models/application_key.rb +16 -16
  31. data/lib/datadog_api_client/v1/models/cancel_downtimes_by_scope_request.rb +1 -1
  32. data/lib/datadog_api_client/v1/models/downtime.rb +1 -1
  33. data/lib/datadog_api_client/v1/models/downtime_child.rb +1 -1
  34. data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
  35. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  36. data/lib/datadog_api_client/v1/models/list_stream_source.rb +3 -0
  37. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  38. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
  39. data/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +12 -1
  40. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -1
  41. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +21 -1
  42. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +21 -1
  43. data/lib/datadog_api_client/v2/api/incidents_api.rb +384 -0
  44. data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +153 -0
  45. data/lib/datadog_api_client/v2/api/logs_api.rb +1 -0
  46. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +236 -0
  47. data/lib/datadog_api_client/v2/api/synthetics_api.rb +153 -0
  48. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  49. data/lib/datadog_api_client/v2/model_base.rb +7 -3
  50. data/lib/datadog_api_client/v2/models/events_data_source.rb +1 -0
  51. data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +161 -0
  52. data/lib/datadog_api_client/v2/models/incident_integration_metadata_create_data.rb +123 -0
  53. data/lib/datadog_api_client/v2/models/incident_integration_metadata_create_request.rb +102 -0
  54. data/lib/datadog_api_client/v2/models/incident_integration_metadata_list_response.rb +126 -0
  55. data/lib/datadog_api_client/v2/models/incident_integration_metadata_metadata.rb +63 -0
  56. data/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_data.rb +123 -0
  57. data/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_request.rb +102 -0
  58. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response.rb +114 -0
  59. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +133 -0
  60. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_included_item.rb +62 -0
  61. data/lib/datadog_api_client/v2/models/incident_update_data.rb +1 -1
  62. data/lib/datadog_api_client/v2/models/ip_allowlist_attributes.rb +103 -0
  63. data/lib/datadog_api_client/v2/models/ip_allowlist_data.rb +122 -0
  64. data/lib/datadog_api_client/v2/models/ip_allowlist_entry.rb +102 -0
  65. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_attributes.rb +121 -0
  66. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_data.rb +122 -0
  67. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_type.rb +26 -0
  68. data/lib/datadog_api_client/v2/models/ip_allowlist_response.rb +91 -0
  69. data/lib/datadog_api_client/v2/models/ip_allowlist_type.rb +26 -0
  70. data/lib/datadog_api_client/v2/models/ip_allowlist_update_request.rb +102 -0
  71. data/lib/datadog_api_client/v2/models/jira_integration_metadata.rb +104 -0
  72. data/lib/datadog_api_client/v2/models/jira_integration_metadata_issues_item.rb +153 -0
  73. data/lib/datadog_api_client/v2/models/metrics_aggregator.rb +4 -0
  74. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb +91 -0
  75. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_attributes.rb +91 -0
  76. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_response.rb +91 -0
  77. data/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadatas.rb +1 -1
  78. data/lib/datadog_api_client/v2/models/restriction_policy.rb +144 -0
  79. data/lib/datadog_api_client/v2/models/restriction_policy_attributes.rb +104 -0
  80. data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +127 -0
  81. data/lib/datadog_api_client/v2/models/restriction_policy_response.rb +102 -0
  82. data/lib/datadog_api_client/v2/models/restriction_policy_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/restriction_policy_update_request.rb +102 -0
  84. data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +7 -7
  85. data/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +7 -7
  86. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb +1 -0
  87. data/lib/datadog_api_client/v2/models/slack_integration_metadata.rb +104 -0
  88. data/lib/datadog_api_client/v2/models/slack_integration_metadata_channel_item.rb +154 -0
  89. data/lib/datadog_api_client/version.rb +1 -1
  90. metadata +53 -2
@@ -47,6 +47,7 @@ KEYWORDS = {
47
47
  "return",
48
48
  "undef",
49
49
  "yield",
50
+ "hash",
50
51
  }
51
52
 
52
53
  with (pathlib.Path(__file__).parent / "replacement.json").open() as f:
@@ -56,7 +56,13 @@ module {{ module_name }}::{{ version|upper }}
56
56
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
57
57
  end
58
58
  elsif !attributes[self.class.attribute_map[key]].nil?
59
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
59
+ res = _deserialize(type, attributes[self.class.attribute_map[key]])
60
+ if res.instance_of? {{ module_name }}::UnparsedObject
61
+ self._unparsed = true
62
+ elsif (res.kind_of? {{ module_name }}::{{ version|upper }}::BaseGenericModel) && res._unparsed
63
+ self._unparsed = true
64
+ end
65
+ self.send("#{key}=", res)
60
66
  end
61
67
  end
62
68
 
@@ -233,14 +239,12 @@ module {{ module_name }}::{{ version|upper }}
233
239
  return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
234
240
  end
235
241
  else # model
236
- const = DatadogAPIClient::{{ version|upper }}.const_get(klass)
242
+ const = {{ module_name }}::{{ version|upper }}.const_get(klass)
237
243
  if const
238
244
  if const.respond_to?(:openapi_one_of) # nested oneOf model
239
245
  model = const.build(data)
240
246
  return model if model
241
247
  else
242
- # raise if data contains keys that are not known to the model
243
- raise unless (data.keys - const.attribute_map.values).empty?
244
248
  model = const.build_from_hash(data)
245
249
  return model if model && model.valid?
246
250
  end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.9.0 / 2023-03-14
4
+
5
+ ### Fixed
6
+ * Don't raise error on unhandled keys by @therve in https://github.com/DataDog/datadog-api-client-ruby/pull/1259
7
+ * Rename hash attribute by @therve in https://github.com/DataDog/datadog-api-client-ruby/pull/1264
8
+ ### Added
9
+ * Add restriction policy APIs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1238
10
+ * Support RUM data source in Query API and fix aggregators by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1246
11
+ * Add endpoint to get and set on demand concurrency cap for Synthetics by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1242
12
+ * Publish IP allowlist APIs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1231
13
+ * Expose Flutter fields to rum product in the meter usage API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1251
14
+ * Add profiled fargate tasks to usage attribution by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1256
15
+ * Add cipipeline stream to ListStreamSource by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1222
16
+ * Add application_security to security monitoring rule type enum by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1254
17
+ * Add `ci_pipelines` enum to `FormulaAndFunctionEventsDataSource` by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1267
18
+ * Add citest stream to ListStreamSource by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1260
19
+ * Add `logs_issue_stream` enum to `ListStreamSource` by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1268
20
+ * Add support for Incident Integration Metadata APIs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1257
21
+ * Add SLO to GRACE API spec by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1275
22
+ * Add audit trail to usage metering API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1274
23
+
24
+
25
+ **Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.8.0...v2.9.0
26
+
3
27
  ## 2.8.0 / 2023-02-15
4
28
 
5
29
  ### Fixed
@@ -0,0 +1,62 @@
1
+ # Create a new timeseries widget with ci_pipelines data source
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::DashboardsAPI.new
5
+
6
+ body = DatadogAPIClient::V1::Dashboard.new({
7
+ title: "Example-Create_a_new_timeseries_widget_with_ci_pipelines_data_source with ci_pipelines datasource",
8
+ widgets: [
9
+ DatadogAPIClient::V1::Widget.new({
10
+ definition: DatadogAPIClient::V1::TimeseriesWidgetDefinition.new({
11
+ title: "",
12
+ show_legend: true,
13
+ legend_layout: DatadogAPIClient::V1::TimeseriesWidgetLegendLayout::AUTO,
14
+ legend_columns: [
15
+ DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::AVG,
16
+ DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::MIN,
17
+ DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::MAX,
18
+ DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::VALUE,
19
+ DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::SUM,
20
+ ],
21
+ time: DatadogAPIClient::V1::WidgetTime.new({}),
22
+ type: DatadogAPIClient::V1::TimeseriesWidgetDefinitionType::TIMESERIES,
23
+ requests: [
24
+ DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
25
+ formulas: [
26
+ DatadogAPIClient::V1::WidgetFormula.new({
27
+ formula: "query1",
28
+ }),
29
+ ],
30
+ queries: [
31
+ DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition.new({
32
+ data_source: DatadogAPIClient::V1::FormulaAndFunctionEventsDataSource::CI_PIPELINES,
33
+ name: "query1",
34
+ search: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionSearch.new({
35
+ query: "ci_level:job",
36
+ }),
37
+ indexes: [
38
+ "*",
39
+ ],
40
+ compute: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionCompute.new({
41
+ aggregation: DatadogAPIClient::V1::FormulaAndFunctionEventAggregation::COUNT,
42
+ metric: "@ci.queue_time",
43
+ }),
44
+ group_by: [],
45
+ }),
46
+ ],
47
+ response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
48
+ style: DatadogAPIClient::V1::WidgetRequestStyle.new({
49
+ palette: "dog_classic",
50
+ line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
51
+ line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
52
+ }),
53
+ display_type: DatadogAPIClient::V1::WidgetDisplayType::LINE,
54
+ }),
55
+ ],
56
+ }),
57
+ }),
58
+ ],
59
+ layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
60
+ reflow_type: DatadogAPIClient::V1::DashboardReflowType::AUTO,
61
+ })
62
+ p api_instance.create_dashboard(body)
@@ -0,0 +1,32 @@
1
+ # Create a new dashboard with ci_test_stream list_stream widget
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::DashboardsAPI.new
5
+
6
+ body = DatadogAPIClient::V1::Dashboard.new({
7
+ layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
8
+ title: "Example-Create_a_new_dashboard_with_ci_test_stream_list_stream_widget with list_stream widget",
9
+ widgets: [
10
+ DatadogAPIClient::V1::Widget.new({
11
+ definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({
12
+ type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM,
13
+ requests: [
14
+ DatadogAPIClient::V1::ListStreamWidgetRequest.new({
15
+ columns: [
16
+ DatadogAPIClient::V1::ListStreamColumn.new({
17
+ width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
18
+ field: "timestamp",
19
+ }),
20
+ ],
21
+ query: DatadogAPIClient::V1::ListStreamQuery.new({
22
+ data_source: DatadogAPIClient::V1::ListStreamSource::CI_TEST_STREAM,
23
+ query_string: "test_level:suite",
24
+ }),
25
+ response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST,
26
+ }),
27
+ ],
28
+ }),
29
+ }),
30
+ ],
31
+ })
32
+ p api_instance.create_dashboard(body)
@@ -0,0 +1,31 @@
1
+ # Create an incident integration metadata returns "CREATED" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient::V2.configure do |config|
5
+ config.unstable_operations["v2.create_incident_integration".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "incident" in the system
10
+ INCIDENT_DATA_ID = ENV["INCIDENT_DATA_ID"]
11
+
12
+ body = DatadogAPIClient::V2::IncidentIntegrationMetadataCreateRequest.new({
13
+ data: DatadogAPIClient::V2::IncidentIntegrationMetadataCreateData.new({
14
+ attributes: DatadogAPIClient::V2::IncidentIntegrationMetadataAttributes.new({
15
+ incident_id: INCIDENT_DATA_ID,
16
+ integration_type: 1,
17
+ metadata: DatadogAPIClient::V2::SlackIntegrationMetadata.new({
18
+ channels: [
19
+ DatadogAPIClient::V2::SlackIntegrationMetadataChannelItem.new({
20
+ channel_id: "C0123456789",
21
+ channel_name: "#new-channel",
22
+ team_id: "T01234567",
23
+ redirect_url: "https://slack.com/app_redirect?channel=C0123456789&team=T01234567",
24
+ }),
25
+ ],
26
+ }),
27
+ }),
28
+ type: DatadogAPIClient::V2::IncidentIntegrationMetadataType::INCIDENT_INTEGRATIONS,
29
+ }),
30
+ })
31
+ p api_instance.create_incident_integration(INCIDENT_DATA_ID, body)
@@ -0,0 +1,14 @@
1
+ # Delete an incident integration metadata returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient::V2.configure do |config|
5
+ config.unstable_operations["v2.delete_incident_integration".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "incident" in the system
10
+ INCIDENT_DATA_ID = ENV["INCIDENT_DATA_ID"]
11
+
12
+ # the "incident" has an "incident_integration_metadata"
13
+ INCIDENT_INTEGRATION_METADATA_DATA_ID = ENV["INCIDENT_INTEGRATION_METADATA_DATA_ID"]
14
+ api_instance.delete_incident_integration(INCIDENT_DATA_ID, INCIDENT_INTEGRATION_METADATA_DATA_ID)
@@ -0,0 +1,14 @@
1
+ # Get incident integration metadata details returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient::V2.configure do |config|
5
+ config.unstable_operations["v2.get_incident_integration".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "incident" in the system
10
+ INCIDENT_DATA_ID = ENV["INCIDENT_DATA_ID"]
11
+
12
+ # the "incident" has an "incident_integration_metadata"
13
+ INCIDENT_INTEGRATION_METADATA_DATA_ID = ENV["INCIDENT_INTEGRATION_METADATA_DATA_ID"]
14
+ p api_instance.get_incident_integration(INCIDENT_DATA_ID, INCIDENT_INTEGRATION_METADATA_DATA_ID)
@@ -0,0 +1,11 @@
1
+ # Get a list of an incident's integration metadata returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient::V2.configure do |config|
5
+ config.unstable_operations["v2.list_incident_integrations".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "incident" in the system
10
+ INCIDENT_DATA_ID = ENV["INCIDENT_DATA_ID"]
11
+ p api_instance.list_incident_integrations(INCIDENT_DATA_ID)
@@ -0,0 +1,34 @@
1
+ # Update an existing incident integration metadata returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient::V2.configure do |config|
5
+ config.unstable_operations["v2.update_incident_integration".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "incident" in the system
10
+ INCIDENT_DATA_ID = ENV["INCIDENT_DATA_ID"]
11
+
12
+ # the "incident" has an "incident_integration_metadata"
13
+ INCIDENT_INTEGRATION_METADATA_DATA_ID = ENV["INCIDENT_INTEGRATION_METADATA_DATA_ID"]
14
+
15
+ body = DatadogAPIClient::V2::IncidentIntegrationMetadataPatchRequest.new({
16
+ data: DatadogAPIClient::V2::IncidentIntegrationMetadataPatchData.new({
17
+ attributes: DatadogAPIClient::V2::IncidentIntegrationMetadataAttributes.new({
18
+ incident_id: INCIDENT_DATA_ID,
19
+ integration_type: 1,
20
+ metadata: DatadogAPIClient::V2::SlackIntegrationMetadata.new({
21
+ channels: [
22
+ DatadogAPIClient::V2::SlackIntegrationMetadataChannelItem.new({
23
+ channel_id: "C0123456789",
24
+ channel_name: "#updated-channel-name",
25
+ team_id: "T01234567",
26
+ redirect_url: "https://slack.com/app_redirect?channel=C0123456789&team=T01234567",
27
+ }),
28
+ ],
29
+ }),
30
+ }),
31
+ type: DatadogAPIClient::V2::IncidentIntegrationMetadataType::INCIDENT_INTEGRATIONS,
32
+ }),
33
+ })
34
+ p api_instance.update_incident_integration(INCIDENT_DATA_ID, INCIDENT_INTEGRATION_METADATA_DATA_ID, body)
@@ -0,0 +1,5 @@
1
+ # Get IP Allowlist returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::IPAllowlistAPI.new
5
+ p api_instance.get_ip_allowlist()
@@ -0,0 +1,25 @@
1
+ # Update IP Allowlist returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::IPAllowlistAPI.new
5
+
6
+ body = DatadogAPIClient::V2::IPAllowlistUpdateRequest.new({
7
+ data: DatadogAPIClient::V2::IPAllowlistData.new({
8
+ attributes: DatadogAPIClient::V2::IPAllowlistAttributes.new({
9
+ entries: [
10
+ DatadogAPIClient::V2::IPAllowlistEntry.new({
11
+ data: DatadogAPIClient::V2::IPAllowlistEntryData.new({
12
+ attributes: DatadogAPIClient::V2::IPAllowlistEntryAttributes.new({
13
+ note: "Example-Update_IP_Allowlist_returns_OK_response",
14
+ cidr_block: "127.0.0.1",
15
+ }),
16
+ type: DatadogAPIClient::V2::IPAllowlistEntryType::IP_ALLOWLIST_ENTRY,
17
+ }),
18
+ }),
19
+ ],
20
+ enabled: false,
21
+ }),
22
+ type: DatadogAPIClient::V2::IPAllowlistType::IP_ALLOWLIST,
23
+ }),
24
+ })
25
+ p api_instance.update_ip_allowlist(body)
@@ -5,7 +5,7 @@ api_instance = DatadogAPIClient::V2::LogsMetricsAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V2::LogsMetricCreateRequest.new({
7
7
  data: DatadogAPIClient::V2::LogsMetricCreateData.new({
8
- id: "Example-Create_a_log_based_metric_returns_OK_response",
8
+ id: "ExampleCreatealogbasedmetricreturnsOKresponse",
9
9
  type: DatadogAPIClient::V2::LogsMetricType::LOGS_METRICS,
10
10
  attributes: DatadogAPIClient::V2::LogsMetricCreateAttributes.new({
11
11
  compute: DatadogAPIClient::V2::LogsMetricCompute.new({
@@ -0,0 +1,5 @@
1
+ # Delete a restriction policy returns "No Content" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::RestrictionPoliciesAPI.new
5
+ api_instance.delete_restriction_policy("dashboard:test-delete")
@@ -0,0 +1,5 @@
1
+ # Get a restriction policy returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::RestrictionPoliciesAPI.new
5
+ p api_instance.get_restriction_policy("dashboard:test-get")
@@ -0,0 +1,25 @@
1
+ # Update a restriction policy returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::RestrictionPoliciesAPI.new
5
+
6
+ # there is a valid "user" in the system
7
+ USER_DATA_RELATIONSHIPS_ORG_DATA_ID = ENV["USER_DATA_RELATIONSHIPS_ORG_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::RestrictionPolicyUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::RestrictionPolicy.new({
11
+ id: "dashboard:test-update",
12
+ type: DatadogAPIClient::V2::RestrictionPolicyType::RESTRICTION_POLICY,
13
+ attributes: DatadogAPIClient::V2::RestrictionPolicyAttributes.new({
14
+ bindings: [
15
+ DatadogAPIClient::V2::RestrictionPolicyBinding.new({
16
+ relation: "editor",
17
+ principals: [
18
+ "org:00000000-0000-beef-0000-000000000000",
19
+ ],
20
+ }),
21
+ ],
22
+ }),
23
+ }),
24
+ })
25
+ p api_instance.update_restriction_policy("dashboard:test-update", body)
@@ -0,0 +1,5 @@
1
+ # Get the on-demand concurrency cap returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5
+ p api_instance.get_on_demand_concurrency_cap()
@@ -0,0 +1,5 @@
1
+ # Get on demand concurrency cap
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5
+ p api_instance.get_on_demand_concurrency_cap()
@@ -0,0 +1,7 @@
1
+ # Save new value for on-demand concurrency cap returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::OnDemandConcurrencyCapAttributes.new({})
7
+ p api_instance.set_on_demand_concurrency_cap(body)
@@ -0,0 +1,9 @@
1
+ # Save on demand concurrency cap
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::OnDemandConcurrencyCapAttributes.new({
7
+ on_demand_concurrency_cap: 20,
8
+ })
9
+ p api_instance.set_on_demand_concurrency_cap(body)
@@ -178,13 +178,18 @@ module DatadogAPIClient
178
178
  "v2.list_events": false,
179
179
  "v2.search_events": false,
180
180
  "v2.create_incident": false,
181
+ "v2.create_incident_integration": false,
181
182
  "v2.delete_incident": false,
183
+ "v2.delete_incident_integration": false,
182
184
  "v2.get_incident": false,
185
+ "v2.get_incident_integration": false,
183
186
  "v2.list_incident_attachments": false,
187
+ "v2.list_incident_integrations": false,
184
188
  "v2.list_incidents": false,
185
189
  "v2.search_incidents": false,
186
190
  "v2.update_incident": false,
187
191
  "v2.update_incident_attachments": false,
192
+ "v2.update_incident_integration": false,
188
193
  "v2.query_scalar_data": false,
189
194
  "v2.query_timeseries_data": false,
190
195
  "v2.create_incident_service": false,
@@ -1030,6 +1030,16 @@ module DatadogAPIClient
1030
1030
  "v2.incident_field_attributes_single_value" => "IncidentFieldAttributesSingleValue",
1031
1031
  "v2.incident_field_attributes_single_value_type" => "IncidentFieldAttributesSingleValueType",
1032
1032
  "v2.incident_field_attributes_value_type" => "IncidentFieldAttributesValueType",
1033
+ "v2.incident_integration_metadata_attributes" => "IncidentIntegrationMetadataAttributes",
1034
+ "v2.incident_integration_metadata_create_data" => "IncidentIntegrationMetadataCreateData",
1035
+ "v2.incident_integration_metadata_create_request" => "IncidentIntegrationMetadataCreateRequest",
1036
+ "v2.incident_integration_metadata_list_response" => "IncidentIntegrationMetadataListResponse",
1037
+ "v2.incident_integration_metadata_metadata" => "IncidentIntegrationMetadataMetadata",
1038
+ "v2.incident_integration_metadata_patch_data" => "IncidentIntegrationMetadataPatchData",
1039
+ "v2.incident_integration_metadata_patch_request" => "IncidentIntegrationMetadataPatchRequest",
1040
+ "v2.incident_integration_metadata_response" => "IncidentIntegrationMetadataResponse",
1041
+ "v2.incident_integration_metadata_response_data" => "IncidentIntegrationMetadataResponseData",
1042
+ "v2.incident_integration_metadata_response_included_item" => "IncidentIntegrationMetadataResponseIncludedItem",
1033
1043
  "v2.incident_integration_metadata_type" => "IncidentIntegrationMetadataType",
1034
1044
  "v2.incident_notification_handle" => "IncidentNotificationHandle",
1035
1045
  "v2.incident_postmortem_type" => "IncidentPostmortemType",
@@ -1090,6 +1100,17 @@ module DatadogAPIClient
1090
1100
  "v2.incident_update_relationships" => "IncidentUpdateRelationships",
1091
1101
  "v2.incident_update_request" => "IncidentUpdateRequest",
1092
1102
  "v2.intake_payload_accepted" => "IntakePayloadAccepted",
1103
+ "v2.ip_allowlist_attributes" => "IPAllowlistAttributes",
1104
+ "v2.ip_allowlist_data" => "IPAllowlistData",
1105
+ "v2.ip_allowlist_entry" => "IPAllowlistEntry",
1106
+ "v2.ip_allowlist_entry_attributes" => "IPAllowlistEntryAttributes",
1107
+ "v2.ip_allowlist_entry_data" => "IPAllowlistEntryData",
1108
+ "v2.ip_allowlist_entry_type" => "IPAllowlistEntryType",
1109
+ "v2.ip_allowlist_response" => "IPAllowlistResponse",
1110
+ "v2.ip_allowlist_type" => "IPAllowlistType",
1111
+ "v2.ip_allowlist_update_request" => "IPAllowlistUpdateRequest",
1112
+ "v2.jira_integration_metadata" => "JiraIntegrationMetadata",
1113
+ "v2.jira_integration_metadata_issues_item" => "JiraIntegrationMetadataIssuesItem",
1093
1114
  "v2.list_application_keys_response" => "ListApplicationKeysResponse",
1094
1115
  "v2.log" => "Log",
1095
1116
  "v2.log_attributes" => "LogAttributes",
@@ -1245,6 +1266,9 @@ module DatadogAPIClient
1245
1266
  "v2.monitor_type" => "MonitorType",
1246
1267
  "v2.nullable_relationship_to_user" => "NullableRelationshipToUser",
1247
1268
  "v2.nullable_relationship_to_user_data" => "NullableRelationshipToUserData",
1269
+ "v2.on_demand_concurrency_cap" => "OnDemandConcurrencyCap",
1270
+ "v2.on_demand_concurrency_cap_attributes" => "OnDemandConcurrencyCapAttributes",
1271
+ "v2.on_demand_concurrency_cap_response" => "OnDemandConcurrencyCapResponse",
1248
1272
  "v2.opsgenie_service_create_attributes" => "OpsgenieServiceCreateAttributes",
1249
1273
  "v2.opsgenie_service_create_data" => "OpsgenieServiceCreateData",
1250
1274
  "v2.opsgenie_service_create_request" => "OpsgenieServiceCreateRequest",
@@ -1299,6 +1323,12 @@ module DatadogAPIClient
1299
1323
  "v2.relationship_to_user_data" => "RelationshipToUserData",
1300
1324
  "v2.relationship_to_users" => "RelationshipToUsers",
1301
1325
  "v2.response_meta_attributes" => "ResponseMetaAttributes",
1326
+ "v2.restriction_policy" => "RestrictionPolicy",
1327
+ "v2.restriction_policy_attributes" => "RestrictionPolicyAttributes",
1328
+ "v2.restriction_policy_binding" => "RestrictionPolicyBinding",
1329
+ "v2.restriction_policy_response" => "RestrictionPolicyResponse",
1330
+ "v2.restriction_policy_type" => "RestrictionPolicyType",
1331
+ "v2.restriction_policy_update_request" => "RestrictionPolicyUpdateRequest",
1302
1332
  "v2.role" => "Role",
1303
1333
  "v2.role_attributes" => "RoleAttributes",
1304
1334
  "v2.role_clone" => "RoleClone",
@@ -1541,6 +1571,8 @@ module DatadogAPIClient
1541
1571
  "v2.service_definition_v2_slack" => "ServiceDefinitionV2Slack",
1542
1572
  "v2.service_definition_v2_slack_type" => "ServiceDefinitionV2SlackType",
1543
1573
  "v2.service_definition_v2_version" => "ServiceDefinitionV2Version",
1574
+ "v2.slack_integration_metadata" => "SlackIntegrationMetadata",
1575
+ "v2.slack_integration_metadata_channel_item" => "SlackIntegrationMetadataChannelItem",
1544
1576
  "v2.timeseries_formula_query_request" => "TimeseriesFormulaQueryRequest",
1545
1577
  "v2.timeseries_formula_query_response" => "TimeseriesFormulaQueryResponse",
1546
1578
  "v2.timeseries_formula_request" => "TimeseriesFormulaRequest",
@@ -1626,6 +1658,7 @@ module DatadogAPIClient
1626
1658
  "v2.incident_services_api" => "IncidentServicesAPI",
1627
1659
  "v2.incident_teams_api" => "IncidentTeamsAPI",
1628
1660
  "v2.incidents_api" => "IncidentsAPI",
1661
+ "v2.ip_allowlist_api" => "IPAllowlistAPI",
1629
1662
  "v2.key_management_api" => "KeyManagementAPI",
1630
1663
  "v2.logs_api" => "LogsAPI",
1631
1664
  "v2.logs_archives_api" => "LogsArchivesAPI",
@@ -1635,12 +1668,14 @@ module DatadogAPIClient
1635
1668
  "v2.opsgenie_integration_api" => "OpsgenieIntegrationAPI",
1636
1669
  "v2.organizations_api" => "OrganizationsAPI",
1637
1670
  "v2.processes_api" => "ProcessesAPI",
1671
+ "v2.restriction_policies_api" => "RestrictionPoliciesAPI",
1638
1672
  "v2.roles_api" => "RolesAPI",
1639
1673
  "v2.rum_api" => "RUMAPI",
1640
1674
  "v2.security_monitoring_api" => "SecurityMonitoringAPI",
1641
1675
  "v2.sensitive_data_scanner_api" => "SensitiveDataScannerAPI",
1642
1676
  "v2.service_accounts_api" => "ServiceAccountsAPI",
1643
1677
  "v2.service_definition_api" => "ServiceDefinitionAPI",
1678
+ "v2.synthetics_api" => "SyntheticsAPI",
1644
1679
  "v2.usage_metering_api" => "UsageMeteringAPI",
1645
1680
  "v2.users_api" => "UsersAPI"
1646
1681
  }
@@ -36,8 +36,8 @@ module DatadogAPIClient::V1
36
36
  # Take graph snapshots.
37
37
  # **Note**: When a snapshot is created, there is some delay before it is available.
38
38
  #
39
- # @param start [Integer] The POSIX timestamp of the start of the query.
40
- # @param _end [Integer] The POSIX timestamp of the end of the query.
39
+ # @param start [Integer] The POSIX timestamp of the start of the query in seconds.
40
+ # @param _end [Integer] The POSIX timestamp of the end of the query in seconds.
41
41
  # @param opts [Hash] the optional parameters
42
42
  # @option opts [String] :metric_query The metric query.
43
43
  # @option opts [String] :event_query A query that adds event bands to the graph.
@@ -152,7 +152,7 @@ module DatadogAPIClient::V1
152
152
  fail ArgumentError, "Missing the required parameter 'usage_type' when calling UsageMeteringAPI.get_hourly_usage_attribution"
153
153
  end
154
154
  # verify enum value
155
- allowable_values = ['api_usage', 'apm_fargate_usage', 'apm_host_usage', 'appsec_fargate_usage', 'appsec_usage', 'browser_usage', 'container_excl_agent_usage', 'container_usage', 'cspm_containers_usage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'cws_containers_usage', 'cws_hosts_usage', 'dbm_hosts_usage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_ingested_logs_usage', 'estimated_indexed_spans_usage', 'estimated_ingested_spans_usage', 'fargate_usage', 'functions_usage', 'infra_host_usage', 'invocations_usage', 'npm_host_usage', 'profiled_container_usage', 'profiled_host_usage', 'snmp_usage', 'estimated_rum_sessions_usage']
155
+ allowable_values = ['api_usage', 'apm_fargate_usage', 'apm_host_usage', 'appsec_fargate_usage', 'appsec_usage', 'browser_usage', 'container_excl_agent_usage', 'container_usage', 'cspm_containers_usage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'cws_containers_usage', 'cws_hosts_usage', 'dbm_hosts_usage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_ingested_logs_usage', 'estimated_indexed_spans_usage', 'estimated_ingested_spans_usage', 'fargate_usage', 'functions_usage', 'infra_host_usage', 'invocations_usage', 'npm_host_usage', 'profiled_container_usage', 'profiled_fargate_usage', 'profiled_host_usage', 'snmp_usage', 'estimated_rum_sessions_usage']
156
156
  if @api_client.config.client_side_validation && !allowable_values.include?(usage_type)
157
157
  fail ArgumentError, "invalid value for \"usage_type\", must be one of #{allowable_values}"
158
158
  end
@@ -472,7 +472,7 @@ module DatadogAPIClient::V1
472
472
  fail ArgumentError, "Missing the required parameter 'fields' when calling UsageMeteringAPI.get_monthly_usage_attribution"
473
473
  end
474
474
  # verify enum value
475
- allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', '*']
475
+ allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', '*']
476
476
  if @api_client.config.client_side_validation && !allowable_values.include?(fields)
477
477
  fail ArgumentError, "invalid value for \"fields\", must be one of #{allowable_values}"
478
478
  end
@@ -480,7 +480,7 @@ module DatadogAPIClient::V1
480
480
  if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
481
481
  fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
482
482
  end
483
- allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', '*']
483
+ allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', '*']
484
484
  if @api_client.config.client_side_validation && opts[:'sort_name'] && !allowable_values.include?(opts[:'sort_name'])
485
485
  fail ArgumentError, "invalid value for \"sort_name\", must be one of #{allowable_values}"
486
486
  end
@@ -67,7 +67,13 @@ module DatadogAPIClient::V1
67
67
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
68
68
  end
69
69
  elsif !attributes[self.class.attribute_map[key]].nil?
70
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
70
+ res = _deserialize(type, attributes[self.class.attribute_map[key]])
71
+ if res.instance_of? DatadogAPIClient::UnparsedObject
72
+ self._unparsed = true
73
+ elsif (res.kind_of? DatadogAPIClient::V1::BaseGenericModel) && res._unparsed
74
+ self._unparsed = true
75
+ end
76
+ self.send("#{key}=", res)
71
77
  end
72
78
  end
73
79
 
@@ -250,8 +256,6 @@ module DatadogAPIClient::V1
250
256
  model = const.build(data)
251
257
  return model if model
252
258
  else
253
- # raise if data contains keys that are not known to the model
254
- raise unless (data.keys - const.attribute_map.values).empty?
255
259
  model = const.build_from_hash(data)
256
260
  return model if model && model.valid?
257
261
  end