datadog_api_client 2.6.0 → 2.7.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 (134) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +233 -14
  4. data/.generator/schemas/v2/openapi.yaml +1403 -151
  5. data/CHANGELOG.md +27 -0
  6. data/examples/v1/dashboards/CreateDashboard_1039800684.rb +37 -0
  7. data/examples/v1/dashboards/CreateDashboard_2432046716.rb +33 -0
  8. data/examples/v1/dashboards/CreateDashboard_2610827685.rb +38 -0
  9. data/examples/v1/dashboards/CreateDashboard_2843286292.rb +43 -0
  10. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +1 -0
  11. data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +1 -0
  12. data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +1 -0
  13. data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
  14. data/examples/v1/monitors/ValidateMonitor.rb +1 -0
  15. data/examples/v1/service-level-objectives/CreateSLO.rb +2 -2
  16. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +16 -0
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
  18. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +74 -0
  19. data/examples/v1/synthetics/UpdateBrowserTest.rb +16 -0
  20. data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +16 -0
  21. data/examples/v2/cloudflare-integration/DeleteCloudflareAccount.rb +5 -0
  22. data/examples/v2/cloudflare-integration/GetCloudflareAccount.rb +8 -0
  23. data/examples/v2/cloudflare-integration/ListCloudflareAccounts.rb +5 -0
  24. data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +18 -0
  25. data/examples/v2/fastly-integration/CreateFastlyAccount.rb +16 -0
  26. data/examples/v2/fastly-integration/CreateFastlyService.rb +18 -0
  27. data/examples/v2/fastly-integration/DeleteFastlyAccount.rb +5 -0
  28. data/examples/v2/fastly-integration/DeleteFastlyService.rb +5 -0
  29. data/examples/v2/fastly-integration/GetFastlyAccount.rb +8 -0
  30. data/examples/v2/fastly-integration/GetFastlyService.rb +5 -0
  31. data/examples/v2/fastly-integration/ListFastlyAccounts.rb +5 -0
  32. data/examples/v2/fastly-integration/ListFastlyServices.rb +5 -0
  33. data/examples/v2/fastly-integration/UpdateFastlyAccount.rb +17 -0
  34. data/examples/v2/fastly-integration/UpdateFastlyService.rb +18 -0
  35. data/examples/v2/metrics/QueryScalarData.rb +5 -6
  36. data/examples/v2/metrics/QueryScalarData_3112571352.rb +35 -0
  37. data/examples/v2/metrics/QueryTimeseriesData.rb +5 -6
  38. data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +35 -0
  39. data/examples/v2/monitors/CreateMonitorConfigPolicy.rb +22 -0
  40. data/examples/v2/monitors/DeleteMonitorConfigPolicy.rb +8 -0
  41. data/examples/v2/monitors/GetMonitorConfigPolicy.rb +8 -0
  42. data/examples/v2/monitors/ListMonitorConfigPolicies.rb +5 -0
  43. data/examples/v2/monitors/UpdateMonitorConfigPolicy.rb +26 -0
  44. data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +6 -0
  45. data/examples/v2/{users → service-accounts}/CreateServiceAccount.rb +1 -1
  46. data/lib/datadog_api_client/inflector.rb +61 -0
  47. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  48. data/lib/datadog_api_client/v1/models/gcp_account.rb +11 -1
  49. data/lib/datadog_api_client/v1/models/host_meta.rb +1 -1
  50. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -1
  51. data/lib/datadog_api_client/v1/models/list_stream_compute_aggregation.rb +40 -0
  52. data/lib/datadog_api_client/v1/models/list_stream_compute_items.rb +112 -0
  53. data/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb +102 -0
  54. data/lib/datadog_api_client/v1/models/list_stream_query.rb +61 -1
  55. data/lib/datadog_api_client/v1/models/list_stream_source.rb +2 -0
  56. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +3 -2
  57. data/lib/datadog_api_client/v1/models/monitor_options.rb +11 -1
  58. data/lib/datadog_api_client/v1/models/monitor_options_notification_presets.rb +29 -0
  59. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -2
  60. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +13 -13
  61. data/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb +187 -0
  62. data/lib/datadog_api_client/v1/models/run_workflow_widget_definition_type.rb +26 -0
  63. data/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb +123 -0
  64. data/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +1 -1
  65. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
  66. data/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb +28 -0
  67. data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +103 -0
  68. data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +126 -0
  69. data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
  70. data/lib/datadog_api_client/v2/api/cloudflare_integration_api.rb +355 -0
  71. data/lib/datadog_api_client/v2/api/fastly_integration_api.rb +709 -0
  72. data/lib/datadog_api_client/v2/api/metrics_api.rb +7 -6
  73. data/lib/datadog_api_client/v2/api/monitors_api.rb +355 -0
  74. data/lib/datadog_api_client/v2/api/service_accounts_api.rb +67 -0
  75. data/lib/datadog_api_client/v2/api/users_api.rb +0 -67
  76. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb +102 -0
  77. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +133 -0
  78. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb +123 -0
  79. data/lib/datadog_api_client/v2/models/cloudflare_account_response.rb +91 -0
  80. data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +112 -0
  81. data/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb +144 -0
  82. data/lib/datadog_api_client/v2/models/cloudflare_account_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb +102 -0
  84. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +112 -0
  85. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb +101 -0
  86. data/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb +93 -0
  87. data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +11 -1
  88. data/lib/datadog_api_client/v2/models/data_scalar_column.rb +123 -0
  89. data/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb +114 -0
  90. data/lib/datadog_api_client/v2/models/fastly_account_create_request.rb +102 -0
  91. data/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb +135 -0
  92. data/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb +123 -0
  93. data/lib/datadog_api_client/v2/models/fastly_account_response.rb +91 -0
  94. data/lib/datadog_api_client/v2/models/fastly_account_response_data.rb +144 -0
  95. data/lib/datadog_api_client/v2/models/fastly_account_type.rb +26 -0
  96. data/lib/datadog_api_client/v2/models/fastly_account_update_request.rb +102 -0
  97. data/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb +91 -0
  98. data/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb +101 -0
  99. data/lib/datadog_api_client/v2/models/fastly_accounts_response.rb +93 -0
  100. data/lib/datadog_api_client/v2/models/fastly_service.rb +114 -0
  101. data/lib/datadog_api_client/v2/models/fastly_service_attributes.rb +93 -0
  102. data/lib/datadog_api_client/v2/models/fastly_service_data.rb +133 -0
  103. data/lib/datadog_api_client/v2/models/fastly_service_request.rb +102 -0
  104. data/lib/datadog_api_client/v2/models/fastly_service_response.rb +91 -0
  105. data/lib/datadog_api_client/v2/models/fastly_service_type.rb +26 -0
  106. data/lib/datadog_api_client/v2/models/fastly_services_response.rb +93 -0
  107. data/lib/datadog_api_client/v2/models/group_scalar_column.rb +113 -0
  108. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb +123 -0
  109. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb +123 -0
  110. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb +101 -0
  111. data/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb +123 -0
  112. data/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb +102 -0
  113. data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb +144 -0
  114. data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb +102 -0
  115. data/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb +93 -0
  116. data/lib/datadog_api_client/v2/models/monitor_config_policy_policy.rb +62 -0
  117. data/lib/datadog_api_client/v2/models/monitor_config_policy_policy_create_request.rb +62 -0
  118. data/lib/datadog_api_client/v2/models/monitor_config_policy_resource_type.rb +26 -0
  119. data/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb +91 -0
  120. data/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb +111 -0
  121. data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb +124 -0
  122. data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb +150 -0
  123. data/lib/datadog_api_client/v2/models/monitor_config_policy_type.rb +26 -0
  124. data/lib/datadog_api_client/v2/models/scalar_column.rb +35 -77
  125. data/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb +4 -16
  126. data/lib/datadog_api_client/v2/models/scalar_meta.rb +96 -0
  127. data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
  128. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
  129. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +11 -1
  130. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +11 -1
  131. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +22 -9
  132. data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +4 -1
  133. data/lib/datadog_api_client/version.rb +1 -1
  134. metadata +91 -3
@@ -0,0 +1,150 @@
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
+ # Tag attributes of a monitor configuration policy.
21
+ class MonitorConfigPolicyTagPolicyCreateRequest
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The key of the tag.
29
+ attr_reader :tag_key
30
+
31
+ # If a tag key is required for monitor creation.
32
+ attr_reader :tag_key_required
33
+
34
+ # Valid values for the tag.
35
+ attr_reader :valid_tag_values
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'tag_key' => :'tag_key',
42
+ :'tag_key_required' => :'tag_key_required',
43
+ :'valid_tag_values' => :'valid_tag_values'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'tag_key' => :'String',
52
+ :'tag_key_required' => :'Boolean',
53
+ :'valid_tag_values' => :'Array<String>'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param attributes [Hash] Model attributes in the form of hash
59
+ # @!visibility private
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyTagPolicyCreateRequest` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyTagPolicyCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'tag_key')
74
+ self.tag_key = attributes[:'tag_key']
75
+ end
76
+
77
+ if attributes.key?(:'tag_key_required')
78
+ self.tag_key_required = attributes[:'tag_key_required']
79
+ end
80
+
81
+ if attributes.key?(:'valid_tag_values')
82
+ if (value = attributes[:'valid_tag_values']).is_a?(Array)
83
+ self.valid_tag_values = value
84
+ end
85
+ end
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ # @!visibility private
91
+ def valid?
92
+ return false if @tag_key.nil?
93
+ return false if @tag_key.to_s.length > 255
94
+ return false if @tag_key_required.nil?
95
+ return false if @valid_tag_values.nil?
96
+ true
97
+ end
98
+
99
+ # Custom attribute writer method with validation
100
+ # @param tag_key [Object] Object to be assigned
101
+ # @!visibility private
102
+ def tag_key=(tag_key)
103
+ if tag_key.nil?
104
+ fail ArgumentError, 'invalid value for "tag_key", tag_key cannot be nil.'
105
+ end
106
+ if tag_key.to_s.length > 255
107
+ fail ArgumentError, 'invalid value for "tag_key", the character length must be smaller than or equal to 255.'
108
+ end
109
+ @tag_key = tag_key
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param tag_key_required [Object] Object to be assigned
114
+ # @!visibility private
115
+ def tag_key_required=(tag_key_required)
116
+ if tag_key_required.nil?
117
+ fail ArgumentError, 'invalid value for "tag_key_required", tag_key_required cannot be nil.'
118
+ end
119
+ @tag_key_required = tag_key_required
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param valid_tag_values [Object] Object to be assigned
124
+ # @!visibility private
125
+ def valid_tag_values=(valid_tag_values)
126
+ if valid_tag_values.nil?
127
+ fail ArgumentError, 'invalid value for "valid_tag_values", valid_tag_values cannot be nil.'
128
+ end
129
+ @valid_tag_values = valid_tag_values
130
+ end
131
+
132
+ # Checks equality by comparing each attribute.
133
+ # @param o [Object] Object to be compared
134
+ # @!visibility private
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ tag_key == o.tag_key &&
139
+ tag_key_required == o.tag_key_required &&
140
+ valid_tag_values == o.valid_tag_values
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ # @!visibility private
146
+ def hash
147
+ [tag_key, tag_key_required, valid_tag_values].hash
148
+ end
149
+ end
150
+ end
@@ -0,0 +1,26 @@
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
+ # The monitor configuration policy type.
21
+ class MonitorConfigPolicyType
22
+ include BaseEnumModel
23
+
24
+ TAG = "tag".freeze
25
+ end
26
+ end
@@ -18,88 +18,46 @@ require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
20
  # A single column in a scalar query response.
21
- class ScalarColumn
22
- include BaseGenericModel
23
-
24
- # Whether the object has unparsed attributes
25
- # @!visibility private
26
- attr_accessor :_unparsed
27
-
28
- # List of units.
29
- attr_accessor :unit
30
-
31
- # Array of values for each group-by combination that results from one formula or query.
32
- attr_accessor :values
33
-
34
- # Attribute mapping from ruby-style variable name to JSON key.
35
- # @!visibility private
36
- def self.attribute_map
37
- {
38
- :'unit' => :'unit',
39
- :'values' => :'values'
40
- }
41
- end
42
-
43
- # Attribute type mapping.
44
- # @!visibility private
45
- def self.openapi_types
46
- {
47
- :'unit' => :'Array<Unit>',
48
- :'values' => :'Array<Float>'
49
- }
50
- end
51
-
52
- # Initializes the object
53
- # @param attributes [Hash] Model attributes in the form of hash
54
- # @!visibility private
55
- def initialize(attributes = {})
56
- if (!attributes.is_a?(Hash))
57
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ScalarColumn` initialize method"
21
+ module ScalarColumn
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
+ :'GroupScalarColumn',
30
+ :'DataScalarColumn'
31
+ ]
58
32
  end
59
-
60
- # check to see if the attribute exists and convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}) { |(k, v), h|
62
- if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarColumn`. 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._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
64
52
  end
65
- h[k.to_sym] = v
66
- }
67
53
 
68
- if attributes.key?(:'unit')
69
- if (value = attributes[:'unit']).is_a?(Array)
70
- self.unit = value
54
+ if openapi_one_of.include?(:AnyType)
55
+ data
56
+ else
57
+ self._unparsed = true
58
+ DatadogAPIClient::UnparsedObject.new(data)
71
59
  end
72
60
  end
73
-
74
- if attributes.key?(:'values')
75
- if (value = attributes[:'values']).is_a?(Array)
76
- self.values = value
77
- end
78
- end
79
- end
80
-
81
- # Check to see if the all the properties in the model are valid
82
- # @return true if the model is valid
83
- # @!visibility private
84
- def valid?
85
- true
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
- unit == o.unit &&
95
- values == o.values
96
- end
97
-
98
- # Calculates hash code according to all attributes.
99
- # @return [Integer] Hash code
100
- # @!visibility private
101
- def hash
102
- [unit, values].hash
103
61
  end
104
62
  end
105
63
  end
@@ -28,15 +28,11 @@ module DatadogAPIClient::V2
28
28
  # List of response columns, each corresponding to an individual formula or query in the request and with values in parallel arrays matching the series list.
29
29
  attr_accessor :columns
30
30
 
31
- # List of group-by tags for the response. Parallel array to the values in each scalar column.
32
- attr_accessor :series
33
-
34
31
  # Attribute mapping from ruby-style variable name to JSON key.
35
32
  # @!visibility private
36
33
  def self.attribute_map
37
34
  {
38
- :'columns' => :'columns',
39
- :'series' => :'series'
35
+ :'columns' => :'columns'
40
36
  }
41
37
  end
42
38
 
@@ -44,8 +40,7 @@ module DatadogAPIClient::V2
44
40
  # @!visibility private
45
41
  def self.openapi_types
46
42
  {
47
- :'columns' => :'Array<ScalarColumn>',
48
- :'series' => :'Array<Array<String>>'
43
+ :'columns' => :'Array<ScalarColumn>'
49
44
  }
50
45
  end
51
46
 
@@ -70,12 +65,6 @@ module DatadogAPIClient::V2
70
65
  self.columns = value
71
66
  end
72
67
  end
73
-
74
- if attributes.key?(:'series')
75
- if (value = attributes[:'series']).is_a?(Array)
76
- self.series = value
77
- end
78
- end
79
68
  end
80
69
 
81
70
  # Check to see if the all the properties in the model are valid
@@ -91,15 +80,14 @@ module DatadogAPIClient::V2
91
80
  def ==(o)
92
81
  return true if self.equal?(o)
93
82
  self.class == o.class &&
94
- columns == o.columns &&
95
- series == o.series
83
+ columns == o.columns
96
84
  end
97
85
 
98
86
  # Calculates hash code according to all attributes.
99
87
  # @return [Integer] Hash code
100
88
  # @!visibility private
101
89
  def hash
102
- [columns, series].hash
90
+ [columns].hash
103
91
  end
104
92
  end
105
93
  end
@@ -0,0 +1,96 @@
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
+ # Metadata for the resulting numerical values.
21
+ class ScalarMeta
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Detailed information about the unit.
29
+ # First element describes the "primary unit" (for example, `bytes` in `bytes per second`).
30
+ # The second element describes the "per unit" (for example, `second` in `bytes per second`).
31
+ # If the second element is not present, the API returns null.
32
+ attr_accessor :unit
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'unit' => :'unit'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ # @!visibility private
44
+ def self.openapi_types
45
+ {
46
+ :'unit' => :'Array<Unit>'
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::ScalarMeta` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScalarMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'unit')
67
+ if (value = attributes[:'unit']).is_a?(Array)
68
+ self.unit = value
69
+ end
70
+ end
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ # @!visibility private
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param o [Object] Object to be compared
82
+ # @!visibility private
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ unit == o.unit
87
+ end
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Integer] Hash code
91
+ # @!visibility private
92
+ def hash
93
+ [unit].hash
94
+ end
95
+ end
96
+ end
@@ -26,5 +26,6 @@ module DatadogAPIClient::V2
26
26
  ANOMALY_DETECTION = "anomaly_detection".freeze
27
27
  IMPOSSIBLE_TRAVEL = "impossible_travel".freeze
28
28
  HARDCODED = "hardcoded".freeze
29
+ THIRD_PARTY = "third_party".freeze
29
30
  end
30
31
  end
@@ -28,5 +28,6 @@ module DatadogAPIClient::V2
28
28
  NEW_VALUE = "new_value".freeze
29
29
  GEO_DATA = "geo_data".freeze
30
30
  EVENT_COUNT = "event_count".freeze
31
+ NONE = "none".freeze
31
32
  end
32
33
  end
@@ -34,6 +34,9 @@ module DatadogAPIClient::V2
34
34
  # User ID of the user who created the rule.
35
35
  attr_accessor :creation_author_id
36
36
 
37
+ # When the rule will be deprecated, timestamp in milliseconds.
38
+ attr_accessor :deprecation_date
39
+
37
40
  # Additional queries to filter matched events before they are processed.
38
41
  attr_accessor :filters
39
42
 
@@ -83,6 +86,7 @@ module DatadogAPIClient::V2
83
86
  :'cases' => :'cases',
84
87
  :'created_at' => :'createdAt',
85
88
  :'creation_author_id' => :'creationAuthorId',
89
+ :'deprecation_date' => :'deprecationDate',
86
90
  :'filters' => :'filters',
87
91
  :'has_extended_title' => :'hasExtendedTitle',
88
92
  :'id' => :'id',
@@ -107,6 +111,7 @@ module DatadogAPIClient::V2
107
111
  :'cases' => :'Array<SecurityMonitoringRuleCase>',
108
112
  :'created_at' => :'Integer',
109
113
  :'creation_author_id' => :'Integer',
114
+ :'deprecation_date' => :'Integer',
110
115
  :'filters' => :'Array<SecurityMonitoringFilter>',
111
116
  :'has_extended_title' => :'Boolean',
112
117
  :'id' => :'String',
@@ -154,6 +159,10 @@ module DatadogAPIClient::V2
154
159
  self.creation_author_id = attributes[:'creation_author_id']
155
160
  end
156
161
 
162
+ if attributes.key?(:'deprecation_date')
163
+ self.deprecation_date = attributes[:'deprecation_date']
164
+ end
165
+
157
166
  if attributes.key?(:'filters')
158
167
  if (value = attributes[:'filters']).is_a?(Array)
159
168
  self.filters = value
@@ -233,6 +242,7 @@ module DatadogAPIClient::V2
233
242
  cases == o.cases &&
234
243
  created_at == o.created_at &&
235
244
  creation_author_id == o.creation_author_id &&
245
+ deprecation_date == o.deprecation_date &&
236
246
  filters == o.filters &&
237
247
  has_extended_title == o.has_extended_title &&
238
248
  id == o.id &&
@@ -253,7 +263,7 @@ module DatadogAPIClient::V2
253
263
  # @return [Integer] Hash code
254
264
  # @!visibility private
255
265
  def hash
256
- [cases, created_at, creation_author_id, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, type, update_author_id, version].hash
266
+ [cases, created_at, creation_author_id, deprecation_date, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, type, update_author_id, version].hash
257
267
  end
258
268
  end
259
269
  end
@@ -37,6 +37,9 @@ module DatadogAPIClient::V2
37
37
  # User ID of the user who created the rule.
38
38
  attr_accessor :creation_author_id
39
39
 
40
+ # When the rule will be deprecated, timestamp in milliseconds.
41
+ attr_accessor :deprecation_date
42
+
40
43
  # Additional queries to filter matched events before they are processed.
41
44
  attr_accessor :filters
42
45
 
@@ -87,6 +90,7 @@ module DatadogAPIClient::V2
87
90
  :'compliance_signal_options' => :'complianceSignalOptions',
88
91
  :'created_at' => :'createdAt',
89
92
  :'creation_author_id' => :'creationAuthorId',
93
+ :'deprecation_date' => :'deprecationDate',
90
94
  :'filters' => :'filters',
91
95
  :'has_extended_title' => :'hasExtendedTitle',
92
96
  :'id' => :'id',
@@ -112,6 +116,7 @@ module DatadogAPIClient::V2
112
116
  :'compliance_signal_options' => :'CloudConfigurationRuleComplianceSignalOptions',
113
117
  :'created_at' => :'Integer',
114
118
  :'creation_author_id' => :'Integer',
119
+ :'deprecation_date' => :'Integer',
115
120
  :'filters' => :'Array<SecurityMonitoringFilter>',
116
121
  :'has_extended_title' => :'Boolean',
117
122
  :'id' => :'String',
@@ -163,6 +168,10 @@ module DatadogAPIClient::V2
163
168
  self.creation_author_id = attributes[:'creation_author_id']
164
169
  end
165
170
 
171
+ if attributes.key?(:'deprecation_date')
172
+ self.deprecation_date = attributes[:'deprecation_date']
173
+ end
174
+
166
175
  if attributes.key?(:'filters')
167
176
  if (value = attributes[:'filters']).is_a?(Array)
168
177
  self.filters = value
@@ -243,6 +252,7 @@ module DatadogAPIClient::V2
243
252
  compliance_signal_options == o.compliance_signal_options &&
244
253
  created_at == o.created_at &&
245
254
  creation_author_id == o.creation_author_id &&
255
+ deprecation_date == o.deprecation_date &&
246
256
  filters == o.filters &&
247
257
  has_extended_title == o.has_extended_title &&
248
258
  id == o.id &&
@@ -263,7 +273,7 @@ module DatadogAPIClient::V2
263
273
  # @return [Integer] Hash code
264
274
  # @!visibility private
265
275
  def hash
266
- [cases, compliance_signal_options, created_at, creation_author_id, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, type, update_author_id, version].hash
276
+ [cases, compliance_signal_options, created_at, creation_author_id, deprecation_date, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, type, update_author_id, version].hash
267
277
  end
268
278
  end
269
279
  end
@@ -28,8 +28,8 @@ module DatadogAPIClient::V2
28
28
  # Description of the rule.
29
29
  attr_accessor :description
30
30
 
31
- # Attributes excluded from the scan.
32
- attr_accessor :excluded_attributes
31
+ # Attributes excluded from the scan. If namespaces is provided, it has to be a sub-path of the namespaces array.
32
+ attr_accessor :excluded_namespaces
33
33
 
34
34
  # Whether or not the rule is enabled.
35
35
  attr_accessor :is_enabled
@@ -37,6 +37,10 @@ module DatadogAPIClient::V2
37
37
  # Name of the rule.
38
38
  attr_accessor :name
39
39
 
40
+ # Attributes included in the scan. If namespaces is empty or missing, all attributes except excluded_namespaces are scanned.
41
+ # If both are missing the whole event is scanned.
42
+ attr_accessor :namespaces
43
+
40
44
  # Not included if there is a relationship to a standard pattern.
41
45
  attr_accessor :pattern
42
46
 
@@ -51,9 +55,10 @@ module DatadogAPIClient::V2
51
55
  def self.attribute_map
52
56
  {
53
57
  :'description' => :'description',
54
- :'excluded_attributes' => :'excluded_attributes',
58
+ :'excluded_namespaces' => :'excluded_namespaces',
55
59
  :'is_enabled' => :'is_enabled',
56
60
  :'name' => :'name',
61
+ :'namespaces' => :'namespaces',
57
62
  :'pattern' => :'pattern',
58
63
  :'tags' => :'tags',
59
64
  :'text_replacement' => :'text_replacement'
@@ -65,9 +70,10 @@ module DatadogAPIClient::V2
65
70
  def self.openapi_types
66
71
  {
67
72
  :'description' => :'String',
68
- :'excluded_attributes' => :'Array<String>',
73
+ :'excluded_namespaces' => :'Array<String>',
69
74
  :'is_enabled' => :'Boolean',
70
75
  :'name' => :'String',
76
+ :'namespaces' => :'Array<String>',
71
77
  :'pattern' => :'String',
72
78
  :'tags' => :'Array<String>',
73
79
  :'text_replacement' => :'SensitiveDataScannerTextReplacement'
@@ -94,9 +100,9 @@ module DatadogAPIClient::V2
94
100
  self.description = attributes[:'description']
95
101
  end
96
102
 
97
- if attributes.key?(:'excluded_attributes')
98
- if (value = attributes[:'excluded_attributes']).is_a?(Array)
99
- self.excluded_attributes = value
103
+ if attributes.key?(:'excluded_namespaces')
104
+ if (value = attributes[:'excluded_namespaces']).is_a?(Array)
105
+ self.excluded_namespaces = value
100
106
  end
101
107
  end
102
108
 
@@ -108,6 +114,12 @@ module DatadogAPIClient::V2
108
114
  self.name = attributes[:'name']
109
115
  end
110
116
 
117
+ if attributes.key?(:'namespaces')
118
+ if (value = attributes[:'namespaces']).is_a?(Array)
119
+ self.namespaces = value
120
+ end
121
+ end
122
+
111
123
  if attributes.key?(:'pattern')
112
124
  self.pattern = attributes[:'pattern']
113
125
  end
@@ -137,9 +149,10 @@ module DatadogAPIClient::V2
137
149
  return true if self.equal?(o)
138
150
  self.class == o.class &&
139
151
  description == o.description &&
140
- excluded_attributes == o.excluded_attributes &&
152
+ excluded_namespaces == o.excluded_namespaces &&
141
153
  is_enabled == o.is_enabled &&
142
154
  name == o.name &&
155
+ namespaces == o.namespaces &&
143
156
  pattern == o.pattern &&
144
157
  tags == o.tags &&
145
158
  text_replacement == o.text_replacement
@@ -149,7 +162,7 @@ module DatadogAPIClient::V2
149
162
  # @return [Integer] Hash code
150
163
  # @!visibility private
151
164
  def hash
152
- [description, excluded_attributes, is_enabled, name, pattern, tags, text_replacement].hash
165
+ [description, excluded_namespaces, is_enabled, name, namespaces, pattern, tags, text_replacement].hash
153
166
  end
154
167
  end
155
168
  end
@@ -31,7 +31,10 @@ module DatadogAPIClient::V2
31
31
  # The index of the query in the "formulas" array (or "queries" array if no "formulas" was specified).
32
32
  attr_reader :query_index
33
33
 
34
- # List of units.
34
+ # Detailed information about the unit.
35
+ # The first element describes the "primary unit" (for example, `bytes` in `bytes per second`).
36
+ # The second element describes the "per unit" (for example, `second` in `bytes per second`).
37
+ # If the second element is not present, the API returns null.
35
38
  attr_accessor :unit
36
39
 
37
40
  # Attribute mapping from ruby-style variable name to JSON key.