datadog_api_client 2.26.1 → 2.27.1

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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +2152 -10
  4. data/.generator/schemas/v2/openapi.yaml +1771 -41
  5. data/.generator/src/generator/formatter.py +1 -1
  6. data/.github/workflows/approved_status.yml +4 -0
  7. data/.github/workflows/changelog.yml +5 -0
  8. data/.github/workflows/codeql-analysis.yml +4 -0
  9. data/.github/workflows/docs.yml +3 -0
  10. data/.github/workflows/labeler.yml +5 -0
  11. data/.github/workflows/prepare_release.yml +4 -0
  12. data/.github/workflows/publish.yml +5 -0
  13. data/.github/workflows/release.yml +4 -0
  14. data/.github/workflows/stale.yml +6 -0
  15. data/.github/workflows/test.yml +3 -0
  16. data/.github/workflows/test_integration.yml +3 -0
  17. data/CHANGELOG.md +27 -0
  18. data/examples/v1/dashboards/CreateDashboard_1433408735.rb +44 -0
  19. data/examples/v1/dashboards/CreateDashboard_794302680.rb +152 -0
  20. data/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.rb +1 -1
  21. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +1 -1
  22. data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +1 -1
  23. data/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.rb +1 -1
  24. data/examples/v1/synthetics/CreateSyntheticsMobileTest.rb +27 -0
  25. data/examples/v1/synthetics/FetchUptimes.rb +13 -0
  26. data/examples/v1/synthetics/GetMobileTest.rb +8 -0
  27. data/examples/v1/synthetics/UpdateMobileTest.rb +30 -0
  28. data/examples/v2/logs/AggregateLogs_2955613758.rb +0 -1
  29. data/examples/v2/microsoft-teams-integration/CreateApiHandle.rb +17 -0
  30. data/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.rb +17 -0
  31. data/examples/v2/microsoft-teams-integration/DeleteApiHandle.rb +5 -0
  32. data/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.rb +8 -0
  33. data/examples/v2/microsoft-teams-integration/GetApiHandle.rb +5 -0
  34. data/examples/v2/microsoft-teams-integration/GetApiHandleByName.rb +5 -0
  35. data/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.rb +8 -0
  36. data/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.rb +8 -0
  37. data/examples/v2/microsoft-teams-integration/GetChannelByName.rb +5 -0
  38. data/examples/v2/microsoft-teams-integration/ListApiHandles.rb +5 -0
  39. data/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.rb +5 -0
  40. data/examples/v2/microsoft-teams-integration/UpdateApiHandle.rb +17 -0
  41. data/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.rb +18 -0
  42. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +9 -0
  43. data/lib/datadog_api_client/inflector.rb +51 -0
  44. data/lib/datadog_api_client/v1/api/synthetics_api.rb +272 -0
  45. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  46. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  47. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  48. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +11 -1
  49. data/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb +1 -0
  50. data/lib/datadog_api_client/v1/models/synthetics_fetch_uptimes_payload.rb +167 -0
  51. data/lib/datadog_api_client/v1/models/synthetics_mobile_device_id.rb +251 -0
  52. data/lib/datadog_api_client/v1/models/synthetics_mobile_step.rb +203 -0
  53. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_type.rb +42 -0
  54. data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +263 -0
  55. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding.rb +105 -0
  56. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding_items.rb +117 -0
  57. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding_items_role.rb +27 -0
  58. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_ci_options.rb +123 -0
  59. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_config.rb +117 -0
  60. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_initial_application_arguments.rb +105 -0
  61. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_initial_application_arguments_property_names.rb +105 -0
  62. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options.rb +354 -0
  63. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options_monitor_options.rb +155 -0
  64. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options_monitor_options_notification_preset_name.rb +29 -0
  65. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_type.rb +26 -0
  66. data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application.rb +154 -0
  67. data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application_reference_type.rb +27 -0
  68. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
  69. data/lib/datadog_api_client/v1/models/synthetics_test_request_port.rb +63 -0
  70. data/lib/datadog_api_client/v1/models/synthetics_test_uptime.rb +135 -0
  71. data/lib/datadog_api_client/v1/models/synthetics_uptime.rb +161 -0
  72. data/lib/datadog_api_client/v1/models/table_widget_request.rb +16 -4
  73. data/lib/datadog_api_client/v1/models/table_widget_text_format_match.rb +144 -0
  74. data/lib/datadog_api_client/v1/models/table_widget_text_format_match_type.rb +31 -0
  75. data/lib/datadog_api_client/v1/models/table_widget_text_format_palette.rb +36 -0
  76. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace.rb +63 -0
  77. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all.rb +144 -0
  78. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all_type.rb +26 -0
  79. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring.rb +165 -0
  80. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring_type.rb +26 -0
  81. data/lib/datadog_api_client/v1/models/table_widget_text_format_rule.rb +163 -0
  82. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +31 -1
  83. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
  84. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +31 -1
  85. data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +3 -3
  86. data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
  87. data/lib/datadog_api_client/v2/api/metrics_api.rb +4 -4
  88. data/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb +497 -0
  89. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +3 -3
  90. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  91. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
  92. data/lib/datadog_api_client/v2/models/fastly_services_response.rb +1 -1
  93. data/lib/datadog_api_client/v2/models/incident_notification_handle.rb +1 -1
  94. data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +1 -1
  95. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +1 -1
  96. data/lib/datadog_api_client/v2/models/metric_tag_configuration_metric_type_category.rb +27 -0
  97. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +1 -1
  98. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_attributes.rb +186 -0
  99. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response.rb +105 -0
  100. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_attributes.rb +249 -0
  101. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_data.rb +147 -0
  102. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_type.rb +26 -0
  103. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_attributes.rb +202 -0
  104. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_data.rb +144 -0
  105. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_response_data.rb +147 -0
  106. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_type.rb +26 -0
  107. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handles_response.rb +125 -0
  108. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_attributes.rb +165 -0
  109. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_data.rb +147 -0
  110. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_type.rb +26 -0
  111. data/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_request.rb +123 -0
  112. data/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_response.rb +123 -0
  113. data/lib/datadog_api_client/v2/models/microsoft_teams_get_channel_by_name_response.rb +105 -0
  114. data/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request.rb +123 -0
  115. data/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request_data.rb +144 -0
  116. data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +35 -4
  117. data/lib/datadog_api_client/v2/models/security_monitoring_reference_table.rb +145 -0
  118. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
  119. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
  120. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +13 -1
  121. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
  122. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +13 -1
  123. data/lib/datadog_api_client/v2/models/team_update_attributes.rb +1 -26
  124. data/lib/datadog_api_client/version.rb +1 -1
  125. metadata +72 -2
@@ -0,0 +1,123 @@
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
+ # Update handle request.
21
+ class MicrosoftTeamsUpdateApiHandleRequest
22
+ include BaseGenericModel
23
+
24
+ # Handle data from a response.
25
+ attr_reader :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'MicrosoftTeamsUpdateApiHandleRequestData'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequest` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ # @!visibility private
71
+ def valid?
72
+ return false if @data.nil?
73
+ true
74
+ end
75
+
76
+ # Custom attribute writer method with validation
77
+ # @param data [Object] Object to be assigned
78
+ # @!visibility private
79
+ def data=(data)
80
+ if data.nil?
81
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
82
+ end
83
+ @data = data
84
+ end
85
+
86
+ # Returns the object in the form of hash, with additionalProperties support.
87
+ # @return [Hash] Returns the object in the form of hash
88
+ # @!visibility private
89
+ def to_hash
90
+ hash = {}
91
+ self.class.attribute_map.each_pair do |attr, param|
92
+ value = self.send(attr)
93
+ if value.nil?
94
+ is_nullable = self.class.openapi_nullable.include?(attr)
95
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
96
+ end
97
+
98
+ hash[param] = _to_hash(value)
99
+ end
100
+ self.additional_properties.each_pair do |attr, value|
101
+ hash[attr] = value
102
+ end
103
+ hash
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param o [Object] Object to be compared
108
+ # @!visibility private
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ data == o.data
113
+ additional_properties == o.additional_properties
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [data].hash
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,144 @@
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
+ # Handle data from a response.
21
+ class MicrosoftTeamsUpdateApiHandleRequestData
22
+ include BaseGenericModel
23
+
24
+ # Handle attributes.
25
+ attr_reader :attributes
26
+
27
+ # Specifies the handle resource type.
28
+ attr_reader :type
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'attributes' => :'attributes',
37
+ :'type' => :'type'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'attributes' => :'MicrosoftTeamsApiHandleAttributes',
46
+ :'type' => :'MicrosoftTeamsApiHandleType'
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::MicrosoftTeamsUpdateApiHandleRequestData` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'attributes')
69
+ self.attributes = attributes[:'attributes']
70
+ end
71
+
72
+ if attributes.key?(:'type')
73
+ self.type = attributes[:'type']
74
+ end
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ # @!visibility private
80
+ def valid?
81
+ return false if @attributes.nil?
82
+ return false if @type.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param attributes [Object] Object to be assigned
88
+ # @!visibility private
89
+ def attributes=(attributes)
90
+ if attributes.nil?
91
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
92
+ end
93
+ @attributes = attributes
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param type [Object] Object to be assigned
98
+ # @!visibility private
99
+ def type=(type)
100
+ if type.nil?
101
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
102
+ end
103
+ @type = type
104
+ end
105
+
106
+ # Returns the object in the form of hash, with additionalProperties support.
107
+ # @return [Hash] Returns the object in the form of hash
108
+ # @!visibility private
109
+ def to_hash
110
+ hash = {}
111
+ self.class.attribute_map.each_pair do |attr, param|
112
+ value = self.send(attr)
113
+ if value.nil?
114
+ is_nullable = self.class.openapi_nullable.include?(attr)
115
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
116
+ end
117
+
118
+ hash[param] = _to_hash(value)
119
+ end
120
+ self.additional_properties.each_pair do |attr, value|
121
+ hash[attr] = value
122
+ end
123
+ hash
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param o [Object] Object to be compared
128
+ # @!visibility private
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ attributes == o.attributes &&
133
+ type == o.type
134
+ additional_properties == o.additional_properties
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ # @!visibility private
140
+ def hash
141
+ [attributes, type].hash
142
+ end
143
+ end
144
+ end
@@ -21,20 +21,28 @@ module DatadogAPIClient::V2
21
21
  class PowerpackTemplateVariable
22
22
  include BaseGenericModel
23
23
 
24
+ # The list of values that the template variable drop-down is limited to.
25
+ attr_accessor :available_values
26
+
24
27
  # One or many template variable default values within the saved view, which are unioned together using `OR` if more than one is specified.
25
28
  attr_accessor :defaults
26
29
 
27
30
  # The name of the variable.
28
31
  attr_reader :name
29
32
 
33
+ # The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down.
34
+ attr_accessor :prefix
35
+
30
36
  attr_accessor :additional_properties
31
37
 
32
38
  # Attribute mapping from ruby-style variable name to JSON key.
33
39
  # @!visibility private
34
40
  def self.attribute_map
35
41
  {
42
+ :'available_values' => :'available_values',
36
43
  :'defaults' => :'defaults',
37
- :'name' => :'name'
44
+ :'name' => :'name',
45
+ :'prefix' => :'prefix'
38
46
  }
39
47
  end
40
48
 
@@ -42,11 +50,22 @@ module DatadogAPIClient::V2
42
50
  # @!visibility private
43
51
  def self.openapi_types
44
52
  {
53
+ :'available_values' => :'Array<String>',
45
54
  :'defaults' => :'Array<String>',
46
- :'name' => :'String'
55
+ :'name' => :'String',
56
+ :'prefix' => :'String'
47
57
  }
48
58
  end
49
59
 
60
+ # List of attributes with nullable: true
61
+ # @!visibility private
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'available_values',
65
+ :'prefix',
66
+ ])
67
+ end
68
+
50
69
  # Initializes the object
51
70
  # @param attributes [Hash] Model attributes in the form of hash
52
71
  # @!visibility private
@@ -65,6 +84,12 @@ module DatadogAPIClient::V2
65
84
  end
66
85
  }
67
86
 
87
+ if attributes.key?(:'available_values')
88
+ if (value = attributes[:'available_values']).is_a?(Array)
89
+ self.available_values = value
90
+ end
91
+ end
92
+
68
93
  if attributes.key?(:'defaults')
69
94
  if (value = attributes[:'defaults']).is_a?(Array)
70
95
  self.defaults = value
@@ -74,6 +99,10 @@ module DatadogAPIClient::V2
74
99
  if attributes.key?(:'name')
75
100
  self.name = attributes[:'name']
76
101
  end
102
+
103
+ if attributes.key?(:'prefix')
104
+ self.prefix = attributes[:'prefix']
105
+ end
77
106
  end
78
107
 
79
108
  # Check to see if the all the properties in the model are valid
@@ -120,8 +149,10 @@ module DatadogAPIClient::V2
120
149
  def ==(o)
121
150
  return true if self.equal?(o)
122
151
  self.class == o.class &&
152
+ available_values == o.available_values &&
123
153
  defaults == o.defaults &&
124
- name == o.name
154
+ name == o.name &&
155
+ prefix == o.prefix
125
156
  additional_properties == o.additional_properties
126
157
  end
127
158
 
@@ -129,7 +160,7 @@ module DatadogAPIClient::V2
129
160
  # @return [Integer] Hash code
130
161
  # @!visibility private
131
162
  def hash
132
- [defaults, name].hash
163
+ [available_values, defaults, name, prefix].hash
133
164
  end
134
165
  end
135
166
  end
@@ -0,0 +1,145 @@
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
+ # Reference table for the rule.
21
+ class SecurityMonitoringReferenceTable
22
+ include BaseGenericModel
23
+
24
+ # Whether to include or exclude the matched values.
25
+ attr_accessor :check_presence
26
+
27
+ # The name of the column in the reference table.
28
+ attr_accessor :column_name
29
+
30
+ # The field in the log to match against the reference table.
31
+ attr_accessor :log_field_path
32
+
33
+ # The name of the rule query to apply the reference table to.
34
+ attr_accessor :rule_query_name
35
+
36
+ # The name of the reference table.
37
+ attr_accessor :table_name
38
+
39
+ attr_accessor :additional_properties
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ # @!visibility private
43
+ def self.attribute_map
44
+ {
45
+ :'check_presence' => :'checkPresence',
46
+ :'column_name' => :'columnName',
47
+ :'log_field_path' => :'logFieldPath',
48
+ :'rule_query_name' => :'ruleQueryName',
49
+ :'table_name' => :'tableName'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ # @!visibility private
55
+ def self.openapi_types
56
+ {
57
+ :'check_presence' => :'Boolean',
58
+ :'column_name' => :'String',
59
+ :'log_field_path' => :'String',
60
+ :'rule_query_name' => :'String',
61
+ :'table_name' => :'String'
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param attributes [Hash] Model attributes in the form of hash
67
+ # @!visibility private
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringReferenceTable` initialize method"
71
+ end
72
+
73
+ self.additional_properties = {}
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!self.class.attribute_map.key?(k.to_sym))
77
+ self.additional_properties[k.to_sym] = v
78
+ else
79
+ h[k.to_sym] = v
80
+ end
81
+ }
82
+
83
+ if attributes.key?(:'check_presence')
84
+ self.check_presence = attributes[:'check_presence']
85
+ end
86
+
87
+ if attributes.key?(:'column_name')
88
+ self.column_name = attributes[:'column_name']
89
+ end
90
+
91
+ if attributes.key?(:'log_field_path')
92
+ self.log_field_path = attributes[:'log_field_path']
93
+ end
94
+
95
+ if attributes.key?(:'rule_query_name')
96
+ self.rule_query_name = attributes[:'rule_query_name']
97
+ end
98
+
99
+ if attributes.key?(:'table_name')
100
+ self.table_name = attributes[:'table_name']
101
+ end
102
+ end
103
+
104
+ # Returns the object in the form of hash, with additionalProperties support.
105
+ # @return [Hash] Returns the object in the form of hash
106
+ # @!visibility private
107
+ def to_hash
108
+ hash = {}
109
+ self.class.attribute_map.each_pair do |attr, param|
110
+ value = self.send(attr)
111
+ if value.nil?
112
+ is_nullable = self.class.openapi_nullable.include?(attr)
113
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
114
+ end
115
+
116
+ hash[param] = _to_hash(value)
117
+ end
118
+ self.additional_properties.each_pair do |attr, value|
119
+ hash[attr] = value
120
+ end
121
+ hash
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param o [Object] Object to be compared
126
+ # @!visibility private
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ check_presence == o.check_presence &&
131
+ column_name == o.column_name &&
132
+ log_field_path == o.log_field_path &&
133
+ rule_query_name == o.rule_query_name &&
134
+ table_name == o.table_name
135
+ additional_properties == o.additional_properties
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ # @!visibility private
141
+ def hash
142
+ [check_presence, column_name, log_field_path, rule_query_name, table_name].hash
143
+ end
144
+ end
145
+ end
@@ -48,6 +48,9 @@ module DatadogAPIClient::V2
48
48
  # Queries for selecting logs which are part of the rule.
49
49
  attr_accessor :queries
50
50
 
51
+ # Reference tables for the rule.
52
+ attr_accessor :reference_tables
53
+
51
54
  # Tags for generated signals.
52
55
  attr_accessor :tags
53
56
 
@@ -72,6 +75,7 @@ module DatadogAPIClient::V2
72
75
  :'name' => :'name',
73
76
  :'options' => :'options',
74
77
  :'queries' => :'queries',
78
+ :'reference_tables' => :'referenceTables',
75
79
  :'tags' => :'tags',
76
80
  :'third_party_cases' => :'thirdPartyCases',
77
81
  :'version' => :'version'
@@ -91,6 +95,7 @@ module DatadogAPIClient::V2
91
95
  :'name' => :'String',
92
96
  :'options' => :'SecurityMonitoringRuleOptions',
93
97
  :'queries' => :'Array<SecurityMonitoringRuleQuery>',
98
+ :'reference_tables' => :'Array<SecurityMonitoringReferenceTable>',
94
99
  :'tags' => :'Array<String>',
95
100
  :'third_party_cases' => :'Array<SecurityMonitoringThirdPartyRuleCase>',
96
101
  :'version' => :'Integer'
@@ -157,6 +162,12 @@ module DatadogAPIClient::V2
157
162
  end
158
163
  end
159
164
 
165
+ if attributes.key?(:'reference_tables')
166
+ if (value = attributes[:'reference_tables']).is_a?(Array)
167
+ self.reference_tables = value
168
+ end
169
+ end
170
+
160
171
  if attributes.key?(:'tags')
161
172
  if (value = attributes[:'tags']).is_a?(Array)
162
173
  self.tags = value
@@ -227,6 +238,7 @@ module DatadogAPIClient::V2
227
238
  name == o.name &&
228
239
  options == o.options &&
229
240
  queries == o.queries &&
241
+ reference_tables == o.reference_tables &&
230
242
  tags == o.tags &&
231
243
  third_party_cases == o.third_party_cases &&
232
244
  version == o.version
@@ -237,7 +249,7 @@ module DatadogAPIClient::V2
237
249
  # @return [Integer] Hash code
238
250
  # @!visibility private
239
251
  def hash
240
- [cases, compliance_signal_options, filters, has_extended_title, is_enabled, message, name, options, queries, tags, third_party_cases, version].hash
252
+ [cases, compliance_signal_options, filters, has_extended_title, is_enabled, message, name, options, queries, reference_tables, tags, third_party_cases, version].hash
241
253
  end
242
254
  end
243
255
  end
@@ -45,6 +45,9 @@ module DatadogAPIClient::V2
45
45
  # Queries for selecting logs which are part of the rule.
46
46
  attr_reader :queries
47
47
 
48
+ # Reference tables for the rule.
49
+ attr_accessor :reference_tables
50
+
48
51
  # Tags for generated signals.
49
52
  attr_accessor :tags
50
53
 
@@ -68,6 +71,7 @@ module DatadogAPIClient::V2
68
71
  :'name' => :'name',
69
72
  :'options' => :'options',
70
73
  :'queries' => :'queries',
74
+ :'reference_tables' => :'referenceTables',
71
75
  :'tags' => :'tags',
72
76
  :'third_party_cases' => :'thirdPartyCases',
73
77
  :'type' => :'type'
@@ -86,6 +90,7 @@ module DatadogAPIClient::V2
86
90
  :'name' => :'String',
87
91
  :'options' => :'SecurityMonitoringRuleOptions',
88
92
  :'queries' => :'Array<SecurityMonitoringStandardRuleQuery>',
93
+ :'reference_tables' => :'Array<SecurityMonitoringReferenceTable>',
89
94
  :'tags' => :'Array<String>',
90
95
  :'third_party_cases' => :'Array<SecurityMonitoringThirdPartyRuleCaseCreate>',
91
96
  :'type' => :'SecurityMonitoringRuleTypeCreate'
@@ -148,6 +153,12 @@ module DatadogAPIClient::V2
148
153
  end
149
154
  end
150
155
 
156
+ if attributes.key?(:'reference_tables')
157
+ if (value = attributes[:'reference_tables']).is_a?(Array)
158
+ self.reference_tables = value
159
+ end
160
+ end
161
+
151
162
  if attributes.key?(:'tags')
152
163
  if (value = attributes[:'tags']).is_a?(Array)
153
164
  self.tags = value
@@ -272,6 +283,7 @@ module DatadogAPIClient::V2
272
283
  name == o.name &&
273
284
  options == o.options &&
274
285
  queries == o.queries &&
286
+ reference_tables == o.reference_tables &&
275
287
  tags == o.tags &&
276
288
  third_party_cases == o.third_party_cases &&
277
289
  type == o.type
@@ -282,7 +294,7 @@ module DatadogAPIClient::V2
282
294
  # @return [Integer] Hash code
283
295
  # @!visibility private
284
296
  def hash
285
- [cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, third_party_cases, type].hash
297
+ [cases, filters, has_extended_title, is_enabled, message, name, options, queries, reference_tables, tags, third_party_cases, type].hash
286
298
  end
287
299
  end
288
300
  end
@@ -45,6 +45,9 @@ module DatadogAPIClient::V2
45
45
  # Queries for selecting logs which are part of the rule.
46
46
  attr_reader :queries
47
47
 
48
+ # Reference tables for the rule.
49
+ attr_accessor :reference_tables
50
+
48
51
  # Tags for generated signals.
49
52
  attr_accessor :tags
50
53
 
@@ -68,6 +71,7 @@ module DatadogAPIClient::V2
68
71
  :'name' => :'name',
69
72
  :'options' => :'options',
70
73
  :'queries' => :'queries',
74
+ :'reference_tables' => :'referenceTables',
71
75
  :'tags' => :'tags',
72
76
  :'third_party_cases' => :'thirdPartyCases',
73
77
  :'type' => :'type'
@@ -86,6 +90,7 @@ module DatadogAPIClient::V2
86
90
  :'name' => :'String',
87
91
  :'options' => :'SecurityMonitoringRuleOptions',
88
92
  :'queries' => :'Array<SecurityMonitoringStandardRuleQuery>',
93
+ :'reference_tables' => :'Array<SecurityMonitoringReferenceTable>',
89
94
  :'tags' => :'Array<String>',
90
95
  :'third_party_cases' => :'Array<SecurityMonitoringThirdPartyRuleCaseCreate>',
91
96
  :'type' => :'SecurityMonitoringRuleTypeCreate'
@@ -148,6 +153,12 @@ module DatadogAPIClient::V2
148
153
  end
149
154
  end
150
155
 
156
+ if attributes.key?(:'reference_tables')
157
+ if (value = attributes[:'reference_tables']).is_a?(Array)
158
+ self.reference_tables = value
159
+ end
160
+ end
161
+
151
162
  if attributes.key?(:'tags')
152
163
  if (value = attributes[:'tags']).is_a?(Array)
153
164
  self.tags = value
@@ -272,6 +283,7 @@ module DatadogAPIClient::V2
272
283
  name == o.name &&
273
284
  options == o.options &&
274
285
  queries == o.queries &&
286
+ reference_tables == o.reference_tables &&
275
287
  tags == o.tags &&
276
288
  third_party_cases == o.third_party_cases &&
277
289
  type == o.type
@@ -282,7 +294,7 @@ module DatadogAPIClient::V2
282
294
  # @return [Integer] Hash code
283
295
  # @!visibility private
284
296
  def hash
285
- [cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, third_party_cases, type].hash
297
+ [cases, filters, has_extended_title, is_enabled, message, name, options, queries, reference_tables, tags, third_party_cases, type].hash
286
298
  end
287
299
  end
288
300
  end