datadog_api_client 2.19.0 → 2.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +97 -44
  4. data/.generator/schemas/v2/openapi.yaml +704 -42
  5. data/.generator/src/generator/templates/api.j2 +5 -5
  6. data/CHANGELOG.md +20 -0
  7. data/examples/v1/logs-indexes/CreateLogsIndex.rb +5 -0
  8. data/examples/v1/logs-indexes/UpdateLogsIndex.rb +5 -0
  9. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +1 -1
  10. data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
  11. data/examples/v1/synthetics/TriggerCITests.rb +1 -1
  12. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -1
  13. data/examples/v1/usage-metering/GetUsageLambda.rb +5 -2
  14. data/examples/v2/api-management/CreateOpenAPI.rb +11 -0
  15. data/examples/v2/api-management/DeleteOpenAPI.rb +11 -0
  16. data/examples/v2/api-management/GetOpenAPI.rb +11 -0
  17. data/examples/v2/api-management/UpdateOpenAPI.rb +14 -0
  18. data/examples/v2/okta-integration/CreateOktaAccount.rb +1 -1
  19. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +19 -0
  20. data/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.rb +8 -0
  21. data/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.rb +8 -0
  22. data/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.rb +5 -0
  23. data/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.rb +17 -0
  24. data/examples/v2/teams/GetTeamMemberships_3799131168.rb +8 -0
  25. data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +1 -1
  26. data/lib/datadog_api_client/configuration.rb +4 -0
  27. data/lib/datadog_api_client/inflector.rb +22 -0
  28. data/lib/datadog_api_client/v1/api/organizations_api.rb +1 -1
  29. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  30. data/lib/datadog_api_client/v1/models/dashboard.rb +5 -1
  31. data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +2 -0
  32. data/lib/datadog_api_client/v1/models/log.rb +1 -1
  33. data/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb +90 -0
  34. data/lib/datadog_api_client/v1/models/logs_index.rb +36 -1
  35. data/lib/datadog_api_client/v1/models/logs_index_update_request.rb +36 -1
  36. data/lib/datadog_api_client/v1/models/metrics_payload.rb +1 -1
  37. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -1
  38. data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +1 -1
  39. data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +1 -1
  40. data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +1 -1
  41. data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +2 -2
  42. data/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb +1 -1
  43. data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +1 -1
  44. data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +1 -1
  45. data/lib/datadog_api_client/v1/models/split_config.rb +6 -6
  46. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  47. data/lib/datadog_api_client/v1/models/usage_lambda_hour.rb +1 -1
  48. data/lib/datadog_api_client/v1/models/usage_lambda_response.rb +1 -1
  49. data/lib/datadog_api_client/v2/api/api_management_api.rb +319 -0
  50. data/lib/datadog_api_client/v2/api/organizations_api.rb +1 -1
  51. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +329 -0
  52. data/lib/datadog_api_client/v2/api/teams_api.rb +22 -0
  53. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
  54. data/lib/datadog_api_client/v2/models/create_open_api_response.rb +80 -0
  55. data/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb +82 -0
  56. data/lib/datadog_api_client/v2/models/create_open_api_response_data.rb +90 -0
  57. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
  58. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +11 -1
  59. data/lib/datadog_api_client/v2/models/metric_payload.rb +1 -1
  60. data/lib/datadog_api_client/v2/models/open_api_endpoint.rb +90 -0
  61. data/lib/datadog_api_client/v2/models/open_api_file.rb +80 -0
  62. data/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb +100 -0
  63. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +198 -0
  64. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +181 -0
  65. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb +119 -0
  66. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb +98 -0
  67. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb +80 -0
  68. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_type.rb +26 -0
  69. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +166 -0
  70. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb +82 -0
  73. data/lib/datadog_api_client/v2/models/security_monitoring_user.rb +98 -0
  74. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +1 -1
  75. data/lib/datadog_api_client/v2/models/update_open_api_response.rb +80 -0
  76. data/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb +82 -0
  77. data/lib/datadog_api_client/v2/models/update_open_api_response_data.rb +90 -0
  78. data/lib/datadog_api_client/version.rb +1 -1
  79. metadata +34 -3
  80. data/examples/v1/usage-metering/GetUsageLambda_3132428705.rb +0 -8
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
21
21
  class DORADeploymentRequestAttributes
22
22
  include BaseGenericModel
23
23
 
24
+ # Environment name to where the service was deployed.
25
+ attr_accessor :env
26
+
24
27
  # Unix timestamp in nanoseconds when the deployment finished. It should not be older than 3 hours.
25
28
  attr_reader :finished_at
26
29
 
@@ -43,6 +46,7 @@ module DatadogAPIClient::V2
43
46
  # @!visibility private
44
47
  def self.attribute_map
45
48
  {
49
+ :'env' => :'env',
46
50
  :'finished_at' => :'finished_at',
47
51
  :'git' => :'git',
48
52
  :'id' => :'id',
@@ -56,6 +60,7 @@ module DatadogAPIClient::V2
56
60
  # @!visibility private
57
61
  def self.openapi_types
58
62
  {
63
+ :'env' => :'String',
59
64
  :'finished_at' => :'Integer',
60
65
  :'git' => :'DORAGitInfo',
61
66
  :'id' => :'String',
@@ -81,6 +86,10 @@ module DatadogAPIClient::V2
81
86
  h[k.to_sym] = v
82
87
  }
83
88
 
89
+ if attributes.key?(:'env')
90
+ self.env = attributes[:'env']
91
+ end
92
+
84
93
  if attributes.key?(:'finished_at')
85
94
  self.finished_at = attributes[:'finished_at']
86
95
  end
@@ -152,6 +161,7 @@ module DatadogAPIClient::V2
152
161
  def ==(o)
153
162
  return true if self.equal?(o)
154
163
  self.class == o.class &&
164
+ env == o.env &&
155
165
  finished_at == o.finished_at &&
156
166
  git == o.git &&
157
167
  id == o.id &&
@@ -164,7 +174,7 @@ module DatadogAPIClient::V2
164
174
  # @return [Integer] Hash code
165
175
  # @!visibility private
166
176
  def hash
167
- [finished_at, git, id, service, started_at, version].hash
177
+ [env, finished_at, git, id, service, started_at, version].hash
168
178
  end
169
179
  end
170
180
  end
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
21
21
  class DORAIncidentRequestAttributes
22
22
  include BaseGenericModel
23
23
 
24
+ # Environment name that was impacted by the incident.
25
+ attr_accessor :env
26
+
24
27
  # Unix timestamp in nanoseconds when the incident finished. It should not be older than 3 hours.
25
28
  attr_accessor :finished_at
26
29
 
@@ -49,6 +52,7 @@ module DatadogAPIClient::V2
49
52
  # @!visibility private
50
53
  def self.attribute_map
51
54
  {
55
+ :'env' => :'env',
52
56
  :'finished_at' => :'finished_at',
53
57
  :'git' => :'git',
54
58
  :'id' => :'id',
@@ -64,6 +68,7 @@ module DatadogAPIClient::V2
64
68
  # @!visibility private
65
69
  def self.openapi_types
66
70
  {
71
+ :'env' => :'String',
67
72
  :'finished_at' => :'Integer',
68
73
  :'git' => :'DORAGitInfo',
69
74
  :'id' => :'String',
@@ -91,6 +96,10 @@ module DatadogAPIClient::V2
91
96
  h[k.to_sym] = v
92
97
  }
93
98
 
99
+ if attributes.key?(:'env')
100
+ self.env = attributes[:'env']
101
+ end
102
+
94
103
  if attributes.key?(:'finished_at')
95
104
  self.finished_at = attributes[:'finished_at']
96
105
  end
@@ -159,6 +168,7 @@ module DatadogAPIClient::V2
159
168
  def ==(o)
160
169
  return true if self.equal?(o)
161
170
  self.class == o.class &&
171
+ env == o.env &&
162
172
  finished_at == o.finished_at &&
163
173
  git == o.git &&
164
174
  id == o.id &&
@@ -173,7 +183,7 @@ module DatadogAPIClient::V2
173
183
  # @return [Integer] Hash code
174
184
  # @!visibility private
175
185
  def hash
176
- [finished_at, git, id, name, service, severity, started_at, version].hash
186
+ [env, finished_at, git, id, name, service, severity, started_at, version].hash
177
187
  end
178
188
  end
179
189
  end
@@ -21,7 +21,7 @@ module DatadogAPIClient::V2
21
21
  class MetricPayload
22
22
  include BaseGenericModel
23
23
 
24
- # A list of time series to submit to Datadog.
24
+ # A list of timeseries to submit to Datadog.
25
25
  attr_reader :series
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -0,0 +1,90 @@
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
+ # Endpoint info extracted from an `OpenAPI` specification.
21
+ class OpenAPIEndpoint
22
+ include BaseGenericModel
23
+
24
+ # The endpoint method.
25
+ attr_accessor :method
26
+
27
+ # The endpoint path.
28
+ attr_accessor :path
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'method' => :'method',
35
+ :'path' => :'path'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'method' => :'String',
44
+ :'path' => :'String'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpenAPIEndpoint` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpenAPIEndpoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'method')
65
+ self.method = attributes[:'method']
66
+ end
67
+
68
+ if attributes.key?(:'path')
69
+ self.path = attributes[:'path']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ method == o.method &&
80
+ path == o.path
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [method, path].hash
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,80 @@
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
+ # Object for API data in an `OpenAPI` format as a file.
21
+ class OpenAPIFile
22
+ include BaseGenericModel
23
+
24
+ # Binary `OpenAPI` spec file
25
+ attr_accessor :openapi_spec_file
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'openapi_spec_file' => :'openapi_spec_file'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'openapi_spec_file' => :'File'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpenAPIFile` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OpenAPIFile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'openapi_spec_file')
60
+ self.openapi_spec_file = attributes[:'openapi_spec_file']
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ openapi_spec_file == o.openapi_spec_file
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [openapi_spec_file].hash
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,100 @@
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 suppression rule's properties.
21
+ class SecurityMonitoringSuppression
22
+ include BaseGenericModel
23
+
24
+ # The attributes of the suppression rule.
25
+ attr_accessor :attributes
26
+
27
+ # The ID of the suppression rule.
28
+ attr_accessor :id
29
+
30
+ # The type of the resource. The value should always be `suppressions`.
31
+ attr_accessor :type
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'attributes' => :'attributes',
38
+ :'id' => :'id',
39
+ :'type' => :'type'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'attributes' => :'SecurityMonitoringSuppressionAttributes',
48
+ :'id' => :'String',
49
+ :'type' => :'SecurityMonitoringSuppressionType'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param attributes [Hash] Model attributes in the form of hash
55
+ # @!visibility private
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppression` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppression`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'attributes')
70
+ self.attributes = attributes[:'attributes']
71
+ end
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'type')
78
+ self.type = attributes[:'type']
79
+ end
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ attributes == o.attributes &&
89
+ id == o.id &&
90
+ type == o.type
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [attributes, id, type].hash
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,198 @@
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 attributes of the suppression rule.
21
+ class SecurityMonitoringSuppressionAttributes
22
+ include BaseGenericModel
23
+
24
+ # A Unix millisecond timestamp given the creation date of the suppression rule.
25
+ attr_accessor :creation_date
26
+
27
+ # A user.
28
+ attr_accessor :creator
29
+
30
+ # A description for the suppression rule.
31
+ attr_accessor :description
32
+
33
+ # Whether the suppression rule is enabled.
34
+ attr_accessor :enabled
35
+
36
+ # A Unix millisecond timestamp giving an expiration date for the suppression rule. After this date, it won't suppress signals anymore.
37
+ attr_accessor :expiration_date
38
+
39
+ # The name of the suppression rule.
40
+ attr_accessor :name
41
+
42
+ # The rule query of the suppression rule, with the same syntax as the search bar for detection rules.
43
+ attr_accessor :rule_query
44
+
45
+ # The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer.
46
+ attr_accessor :suppression_query
47
+
48
+ # A Unix millisecond timestamp given the update date of the suppression rule.
49
+ attr_accessor :update_date
50
+
51
+ # A user.
52
+ attr_accessor :updater
53
+
54
+ # The version of the suppression rule; it starts at 1, and is incremented at each update.
55
+ attr_reader :version
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ # @!visibility private
59
+ def self.attribute_map
60
+ {
61
+ :'creation_date' => :'creation_date',
62
+ :'creator' => :'creator',
63
+ :'description' => :'description',
64
+ :'enabled' => :'enabled',
65
+ :'expiration_date' => :'expiration_date',
66
+ :'name' => :'name',
67
+ :'rule_query' => :'rule_query',
68
+ :'suppression_query' => :'suppression_query',
69
+ :'update_date' => :'update_date',
70
+ :'updater' => :'updater',
71
+ :'version' => :'version'
72
+ }
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ # @!visibility private
77
+ def self.openapi_types
78
+ {
79
+ :'creation_date' => :'Integer',
80
+ :'creator' => :'SecurityMonitoringUser',
81
+ :'description' => :'String',
82
+ :'enabled' => :'Boolean',
83
+ :'expiration_date' => :'Integer',
84
+ :'name' => :'String',
85
+ :'rule_query' => :'String',
86
+ :'suppression_query' => :'String',
87
+ :'update_date' => :'Integer',
88
+ :'updater' => :'SecurityMonitoringUser',
89
+ :'version' => :'Integer'
90
+ }
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param attributes [Hash] Model attributes in the form of hash
95
+ # @!visibility private
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionAttributes` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!self.class.attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'creation_date')
110
+ self.creation_date = attributes[:'creation_date']
111
+ end
112
+
113
+ if attributes.key?(:'creator')
114
+ self.creator = attributes[:'creator']
115
+ end
116
+
117
+ if attributes.key?(:'description')
118
+ self.description = attributes[:'description']
119
+ end
120
+
121
+ if attributes.key?(:'enabled')
122
+ self.enabled = attributes[:'enabled']
123
+ end
124
+
125
+ if attributes.key?(:'expiration_date')
126
+ self.expiration_date = attributes[:'expiration_date']
127
+ end
128
+
129
+ if attributes.key?(:'name')
130
+ self.name = attributes[:'name']
131
+ end
132
+
133
+ if attributes.key?(:'rule_query')
134
+ self.rule_query = attributes[:'rule_query']
135
+ end
136
+
137
+ if attributes.key?(:'suppression_query')
138
+ self.suppression_query = attributes[:'suppression_query']
139
+ end
140
+
141
+ if attributes.key?(:'update_date')
142
+ self.update_date = attributes[:'update_date']
143
+ end
144
+
145
+ if attributes.key?(:'updater')
146
+ self.updater = attributes[:'updater']
147
+ end
148
+
149
+ if attributes.key?(:'version')
150
+ self.version = attributes[:'version']
151
+ end
152
+ end
153
+
154
+ # Check to see if the all the properties in the model are valid
155
+ # @return true if the model is valid
156
+ # @!visibility private
157
+ def valid?
158
+ return false if !@version.nil? && @version > 2147483647
159
+ true
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param version [Object] Object to be assigned
164
+ # @!visibility private
165
+ def version=(version)
166
+ if !version.nil? && version > 2147483647
167
+ fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 2147483647.'
168
+ end
169
+ @version = version
170
+ end
171
+
172
+ # Checks equality by comparing each attribute.
173
+ # @param o [Object] Object to be compared
174
+ # @!visibility private
175
+ def ==(o)
176
+ return true if self.equal?(o)
177
+ self.class == o.class &&
178
+ creation_date == o.creation_date &&
179
+ creator == o.creator &&
180
+ description == o.description &&
181
+ enabled == o.enabled &&
182
+ expiration_date == o.expiration_date &&
183
+ name == o.name &&
184
+ rule_query == o.rule_query &&
185
+ suppression_query == o.suppression_query &&
186
+ update_date == o.update_date &&
187
+ updater == o.updater &&
188
+ version == o.version
189
+ end
190
+
191
+ # Calculates hash code according to all attributes.
192
+ # @return [Integer] Hash code
193
+ # @!visibility private
194
+ def hash
195
+ [creation_date, creator, description, enabled, expiration_date, name, rule_query, suppression_query, update_date, updater, version].hash
196
+ end
197
+ end
198
+ end