datadog_api_client 2.46.0 → 2.47.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 (141) hide show
  1. checksums.yaml +4 -4
  2. data/.generator/schemas/v1/openapi.yaml +105 -7
  3. data/.generator/schemas/v2/openapi.yaml +1285 -324
  4. data/CHANGELOG.md +26 -0
  5. data/examples/v1/dashboards/CreateDashboard_3685886950.rb +36 -0
  6. data/examples/v1/dashboards/CreateDashboard_865807520.rb +36 -0
  7. data/examples/v1/dashboards/CreateDashboard_9836563.rb +118 -0
  8. data/examples/v2/apm/GetServiceList.rb +5 -0
  9. data/examples/v2/aws-integration/CreateAWSAccount.rb +11 -0
  10. data/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb +11 -0
  11. data/examples/v2/aws-integration/UpdateAWSAccount.rb +11 -0
  12. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +3 -1
  13. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1363354233.rb +1 -1
  14. data/examples/v2/deployment-gates/GetDeploymentGateRules.rb +11 -0
  15. data/examples/v2/events/CreateEvent.rb +1 -0
  16. data/examples/v2/observability-pipelines/CreatePipeline.rb +12 -4
  17. data/examples/v2/observability-pipelines/UpdatePipeline.rb +12 -4
  18. data/examples/v2/observability-pipelines/ValidatePipeline.rb +12 -4
  19. data/examples/v2/on-call/CreateUserNotificationChannel.rb +23 -0
  20. data/examples/v2/on-call/DeleteUserNotificationChannel.rb +11 -0
  21. data/examples/v2/on-call/GetUserNotificationChannel.rb +11 -0
  22. data/examples/v2/on-call/ListUserNotificationChannels.rb +8 -0
  23. data/examples/v2/security-monitoring/CreateCases.rb +2 -2
  24. data/examples/v2/security-monitoring/CreateCases_2385516013.rb +1 -1
  25. data/examples/v2/security-monitoring/CreateCases_2798851680.rb +2 -2
  26. data/examples/v2/security-monitoring/CreateJiraIssues.rb +14 -69
  27. data/examples/v2/security-monitoring/GetSecretsRules.rb +1 -1
  28. data/examples/v2/security-monitoring/GetSuppressionVersionHistory.rb +8 -0
  29. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule_2609327779.rb +54 -0
  30. data/lib/datadog_api_client/configuration.rb +4 -3
  31. data/lib/datadog_api_client/inflector.rb +43 -6
  32. data/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb +13 -3
  33. data/lib/datadog_api_client/v1/models/formula_and_function_metric_semantic_mode.rb +27 -0
  34. data/lib/datadog_api_client/v1/models/geomap_widget_definition.rb +4 -5
  35. data/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb +1 -1
  36. data/lib/datadog_api_client/v1/models/geomap_widget_request.rb +37 -3
  37. data/lib/datadog_api_client/v1/models/geomap_widget_request_style.rb +105 -0
  38. data/lib/datadog_api_client/v1/models/monitor_search_response.rb +1 -1
  39. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
  40. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
  41. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
  42. data/lib/datadog_api_client/v2/api/apm_api.rb +83 -0
  43. data/lib/datadog_api_client/v2/api/deployment_gates_api.rb +71 -0
  44. data/lib/datadog_api_client/v2/api/incidents_api.rb +0 -18
  45. data/lib/datadog_api_client/v2/api/on_call_api.rb +277 -0
  46. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +99 -11
  47. data/lib/datadog_api_client/v2/api/teams_api.rb +6 -0
  48. data/lib/datadog_api_client/v2/models/attach_case_request_data.rb +1 -1
  49. data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data.rb +1 -11
  50. data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_attributes.rb +1 -1
  51. data/lib/datadog_api_client/v2/models/aws_account_create_request_attributes.rb +11 -1
  52. data/lib/datadog_api_client/v2/models/aws_account_response_attributes.rb +11 -1
  53. data/lib/datadog_api_client/v2/models/aws_account_update_request_attributes.rb +11 -1
  54. data/lib/datadog_api_client/v2/models/awsccm_config.rb +107 -0
  55. data/lib/datadog_api_client/v2/models/case_insights_items.rb +3 -3
  56. data/lib/datadog_api_client/v2/models/case_management_project_data.rb +1 -1
  57. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_attributes.rb +11 -1
  58. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_version.rb +2 -2
  59. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +2 -2
  60. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_hash.rb +105 -0
  61. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +1 -1
  62. data/lib/datadog_api_client/v2/models/{create_jira_issue_request_array_included.rb → cloud_workload_security_agent_rule_action_set_value.rb} +5 -5
  63. data/lib/datadog_api_client/v2/models/create_case_request_data.rb +1 -11
  64. data/lib/datadog_api_client/v2/models/create_case_request_data_attributes.rb +3 -3
  65. data/lib/datadog_api_client/v2/models/create_email_notification_channel_config.rb +167 -0
  66. data/lib/datadog_api_client/v2/models/create_jira_issue_request_array.rb +3 -15
  67. data/lib/datadog_api_client/v2/models/create_jira_issue_request_data.rb +1 -11
  68. data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes.rb +43 -3
  69. data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships.rb +35 -14
  70. data/lib/datadog_api_client/v2/models/create_notification_channel_attributes.rb +105 -0
  71. data/lib/datadog_api_client/v2/models/create_notification_channel_config.rb +63 -0
  72. data/lib/datadog_api_client/v2/models/create_notification_channel_data.rb +133 -0
  73. data/lib/datadog_api_client/v2/models/create_phone_notification_channel_config.rb +144 -0
  74. data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_relationships_case.rb → create_user_notification_channel_request.rb} +5 -5
  75. data/lib/datadog_api_client/v2/models/data_export_config.rb +145 -0
  76. data/lib/datadog_api_client/v2/models/deployment_gate_rules_response.rb +105 -0
  77. data/lib/datadog_api_client/v2/models/detach_case_request_data.rb +1 -11
  78. data/lib/datadog_api_client/v2/models/event_payload.rb +26 -1
  79. data/lib/datadog_api_client/v2/models/finding_case_response_data.rb +1 -1
  80. data/lib/datadog_api_client/v2/models/finding_data.rb +1 -1
  81. data/lib/datadog_api_client/v2/models/finding_jira_issue.rb +2 -2
  82. data/lib/datadog_api_client/v2/models/finding_jira_issue_result.rb +4 -4
  83. data/lib/datadog_api_client/v2/models/get_suppression_version_history_data.rb +125 -0
  84. data/lib/datadog_api_client/v2/models/get_suppression_version_history_data_type.rb +26 -0
  85. data/lib/datadog_api_client/v2/models/get_suppression_version_history_response.rb +105 -0
  86. data/lib/datadog_api_client/v2/models/library.rb +13 -1
  87. data/lib/datadog_api_client/v2/models/list_deployment_rule_response_data.rb +165 -0
  88. data/lib/datadog_api_client/v2/models/list_deployment_rules_data_type.rb +26 -0
  89. data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_attributes_fields.rb → list_deployment_rules_response_data_attributes.rb} +12 -10
  90. data/lib/datadog_api_client/v2/models/list_notification_channels_response.rb +107 -0
  91. data/lib/datadog_api_client/v2/models/notification_channel.rb +105 -0
  92. data/lib/datadog_api_client/v2/models/notification_channel_attributes.rb +115 -0
  93. data/lib/datadog_api_client/v2/models/notification_channel_config.rb +64 -0
  94. data/lib/datadog_api_client/v2/models/notification_channel_data.rb +143 -0
  95. data/lib/datadog_api_client/v2/models/notification_channel_email_config.rb +167 -0
  96. data/lib/datadog_api_client/v2/models/notification_channel_email_config_type.rb +26 -0
  97. data/lib/datadog_api_client/v2/models/notification_channel_email_format_type.rb +27 -0
  98. data/lib/datadog_api_client/v2/models/notification_channel_phone_config.rb +225 -0
  99. data/lib/datadog_api_client/v2/models/notification_channel_phone_config_type.rb +26 -0
  100. data/lib/datadog_api_client/v2/models/notification_channel_push_config.rb +165 -0
  101. data/lib/datadog_api_client/v2/models/notification_channel_push_config_type.rb +26 -0
  102. data/lib/datadog_api_client/v2/models/notification_channel_type.rb +26 -0
  103. data/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb +22 -24
  104. data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +22 -24
  105. data/lib/datadog_api_client/v2/models/observability_pipeline_config.rb +2 -2
  106. data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb +211 -0
  107. data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb +22 -24
  108. data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_remap.rb +1 -12
  109. data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb +22 -24
  110. data/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb +22 -24
  111. data/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb +22 -24
  112. data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +22 -24
  113. data/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb +24 -48
  114. data/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb +22 -24
  115. data/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb +22 -24
  116. data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +22 -24
  117. data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +18 -31
  118. data/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb +22 -24
  119. data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +22 -24
  120. data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +22 -24
  121. data/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb +22 -24
  122. data/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb +22 -24
  123. data/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb +22 -24
  124. data/lib/datadog_api_client/v2/models/rule_versions.rb +1 -1
  125. data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +11 -1
  126. data/lib/datadog_api_client/v2/models/service_list.rb +105 -0
  127. data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_relationships_case_data.rb → service_list_data.rb} +17 -18
  128. data/lib/datadog_api_client/v2/models/service_list_data_attributes.rb +119 -0
  129. data/lib/datadog_api_client/v2/models/service_list_data_attributes_metadata_items.rb +115 -0
  130. data/lib/datadog_api_client/v2/models/service_list_data_type.rb +26 -0
  131. data/lib/datadog_api_client/v2/models/suppression_version_history.rb +133 -0
  132. data/lib/datadog_api_client/v2/models/suppression_versions.rb +117 -0
  133. data/lib/datadog_api_client/v2/models/{rule_version_update.rb → version_history_update.rb} +3 -3
  134. data/lib/datadog_api_client/v2/models/{rule_version_update_type.rb → version_history_update_type.rb} +1 -1
  135. data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +11 -1
  136. data/lib/datadog_api_client/v2/models/vulnerability_ecosystem.rb +6 -1
  137. data/lib/datadog_api_client/v2/models/vulnerability_tool.rb +1 -0
  138. data/lib/datadog_api_client/version.rb +1 -1
  139. metadata +55 -9
  140. data/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb +0 -56
  141. data/examples/v2/security-monitoring/CreateJiraIssues_829823123.rb +0 -64
@@ -17,14 +17,17 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # Case linked to the Jira issue.
21
- class CreateJiraIssueRequestDataRelationshipsCaseData
20
+ #
21
+ class ServiceListData
22
22
  include BaseGenericModel
23
23
 
24
24
  #
25
- attr_reader :id
25
+ attr_accessor :attributes
26
26
 
27
- # Cases resource type.
27
+ #
28
+ attr_accessor :id
29
+
30
+ # Services list resource type.
28
31
  attr_reader :type
29
32
 
30
33
  attr_accessor :additional_properties
@@ -33,6 +36,7 @@ module DatadogAPIClient::V2
33
36
  # @!visibility private
34
37
  def self.attribute_map
35
38
  {
39
+ :'attributes' => :'attributes',
36
40
  :'id' => :'id',
37
41
  :'type' => :'type'
38
42
  }
@@ -42,8 +46,9 @@ module DatadogAPIClient::V2
42
46
  # @!visibility private
43
47
  def self.openapi_types
44
48
  {
49
+ :'attributes' => :'ServiceListDataAttributes',
45
50
  :'id' => :'String',
46
- :'type' => :'CaseDataType'
51
+ :'type' => :'ServiceListDataType'
47
52
  }
48
53
  end
49
54
 
@@ -52,7 +57,7 @@ module DatadogAPIClient::V2
52
57
  # @!visibility private
53
58
  def initialize(attributes = {})
54
59
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCaseData` initialize method"
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceListData` initialize method"
56
61
  end
57
62
 
58
63
  self.additional_properties = {}
@@ -65,6 +70,10 @@ module DatadogAPIClient::V2
65
70
  end
66
71
  }
67
72
 
73
+ if attributes.key?(:'attributes')
74
+ self.attributes = attributes[:'attributes']
75
+ end
76
+
68
77
  if attributes.key?(:'id')
69
78
  self.id = attributes[:'id']
70
79
  end
@@ -78,21 +87,10 @@ module DatadogAPIClient::V2
78
87
  # @return true if the model is valid
79
88
  # @!visibility private
80
89
  def valid?
81
- return false if @id.nil?
82
90
  return false if @type.nil?
83
91
  true
84
92
  end
85
93
 
86
- # Custom attribute writer method with validation
87
- # @param id [Object] Object to be assigned
88
- # @!visibility private
89
- def id=(id)
90
- if id.nil?
91
- fail ArgumentError, 'invalid value for "id", id cannot be nil.'
92
- end
93
- @id = id
94
- end
95
-
96
94
  # Custom attribute writer method with validation
97
95
  # @param type [Object] Object to be assigned
98
96
  # @!visibility private
@@ -129,6 +127,7 @@ module DatadogAPIClient::V2
129
127
  def ==(o)
130
128
  return true if self.equal?(o)
131
129
  self.class == o.class &&
130
+ attributes == o.attributes &&
132
131
  id == o.id &&
133
132
  type == o.type &&
134
133
  additional_properties == o.additional_properties
@@ -138,7 +137,7 @@ module DatadogAPIClient::V2
138
137
  # @return [Integer] Hash code
139
138
  # @!visibility private
140
139
  def hash
141
- [id, type, additional_properties].hash
140
+ [attributes, id, type, additional_properties].hash
142
141
  end
143
142
  end
144
143
  end
@@ -0,0 +1,119 @@
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
+ #
21
+ class ServiceListDataAttributes
22
+ include BaseGenericModel
23
+
24
+ #
25
+ attr_accessor :metadata
26
+
27
+ #
28
+ attr_accessor :services
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
+ :'metadata' => :'metadata',
37
+ :'services' => :'services'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'metadata' => :'Array<ServiceListDataAttributesMetadataItems>',
46
+ :'services' => :'Array<String>'
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::ServiceListDataAttributes` 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?(:'metadata')
69
+ if (value = attributes[:'metadata']).is_a?(Array)
70
+ self.metadata = value
71
+ end
72
+ end
73
+
74
+ if attributes.key?(:'services')
75
+ if (value = attributes[:'services']).is_a?(Array)
76
+ self.services = value
77
+ end
78
+ end
79
+ end
80
+
81
+ # Returns the object in the form of hash, with additionalProperties support.
82
+ # @return [Hash] Returns the object in the form of hash
83
+ # @!visibility private
84
+ def to_hash
85
+ hash = {}
86
+ self.class.attribute_map.each_pair do |attr, param|
87
+ value = self.send(attr)
88
+ if value.nil?
89
+ is_nullable = self.class.openapi_nullable.include?(attr)
90
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
91
+ end
92
+
93
+ hash[param] = _to_hash(value)
94
+ end
95
+ self.additional_properties.each_pair do |attr, value|
96
+ hash[attr] = value
97
+ end
98
+ hash
99
+ end
100
+
101
+ # Checks equality by comparing each attribute.
102
+ # @param o [Object] Object to be compared
103
+ # @!visibility private
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ metadata == o.metadata &&
108
+ services == o.services &&
109
+ additional_properties == o.additional_properties
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ # @!visibility private
115
+ def hash
116
+ [metadata, services, additional_properties].hash
117
+ end
118
+ end
119
+ end
@@ -0,0 +1,115 @@
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
+ #
21
+ class ServiceListDataAttributesMetadataItems
22
+ include BaseGenericModel
23
+
24
+ #
25
+ attr_accessor :is_traced
26
+
27
+ #
28
+ attr_accessor :is_usm
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
+ :'is_traced' => :'isTraced',
37
+ :'is_usm' => :'isUsm'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'is_traced' => :'Boolean',
46
+ :'is_usm' => :'Boolean'
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::ServiceListDataAttributesMetadataItems` 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?(:'is_traced')
69
+ self.is_traced = attributes[:'is_traced']
70
+ end
71
+
72
+ if attributes.key?(:'is_usm')
73
+ self.is_usm = attributes[:'is_usm']
74
+ end
75
+ end
76
+
77
+ # Returns the object in the form of hash, with additionalProperties support.
78
+ # @return [Hash] Returns the object in the form of hash
79
+ # @!visibility private
80
+ def to_hash
81
+ hash = {}
82
+ self.class.attribute_map.each_pair do |attr, param|
83
+ value = self.send(attr)
84
+ if value.nil?
85
+ is_nullable = self.class.openapi_nullable.include?(attr)
86
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
87
+ end
88
+
89
+ hash[param] = _to_hash(value)
90
+ end
91
+ self.additional_properties.each_pair do |attr, value|
92
+ hash[attr] = value
93
+ end
94
+ hash
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param o [Object] Object to be compared
99
+ # @!visibility private
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ is_traced == o.is_traced &&
104
+ is_usm == o.is_usm &&
105
+ additional_properties == o.additional_properties
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Integer] Hash code
110
+ # @!visibility private
111
+ def hash
112
+ [is_traced, is_usm, additional_properties].hash
113
+ end
114
+ end
115
+ 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
+ # Services list resource type.
21
+ class ServiceListDataType
22
+ include BaseEnumModel
23
+
24
+ SERVICES_LIST = "services_list".freeze
25
+ end
26
+ end
@@ -0,0 +1,133 @@
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
+ # Response object containing the version history of a suppression.
21
+ class SuppressionVersionHistory
22
+ include BaseGenericModel
23
+
24
+ # The number of suppression versions.
25
+ attr_reader :count
26
+
27
+ # The version history of a suppression.
28
+ attr_accessor :data
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
+ :'count' => :'count',
37
+ :'data' => :'data'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'count' => :'Integer',
46
+ :'data' => :'Hash<String, SuppressionVersions>'
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::SuppressionVersionHistory` 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?(:'count')
69
+ self.count = attributes[:'count']
70
+ end
71
+
72
+ if attributes.key?(:'data')
73
+ self.data = attributes[:'data']
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 !@count.nil? && @count > 2147483647
82
+ true
83
+ end
84
+
85
+ # Custom attribute writer method with validation
86
+ # @param count [Object] Object to be assigned
87
+ # @!visibility private
88
+ def count=(count)
89
+ if !count.nil? && count > 2147483647
90
+ fail ArgumentError, 'invalid value for "count", must be smaller than or equal to 2147483647.'
91
+ end
92
+ @count = count
93
+ end
94
+
95
+ # Returns the object in the form of hash, with additionalProperties support.
96
+ # @return [Hash] Returns the object in the form of hash
97
+ # @!visibility private
98
+ def to_hash
99
+ hash = {}
100
+ self.class.attribute_map.each_pair do |attr, param|
101
+ value = self.send(attr)
102
+ if value.nil?
103
+ is_nullable = self.class.openapi_nullable.include?(attr)
104
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
105
+ end
106
+
107
+ hash[param] = _to_hash(value)
108
+ end
109
+ self.additional_properties.each_pair do |attr, value|
110
+ hash[attr] = value
111
+ end
112
+ hash
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param o [Object] Object to be compared
117
+ # @!visibility private
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ count == o.count &&
122
+ data == o.data &&
123
+ additional_properties == o.additional_properties
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ # @!visibility private
129
+ def hash
130
+ [count, data, additional_properties].hash
131
+ end
132
+ end
133
+ end
@@ -0,0 +1,117 @@
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
+ # A suppression version with a list of updates.
21
+ class SuppressionVersions
22
+ include BaseGenericModel
23
+
24
+ # A list of changes.
25
+ attr_accessor :changes
26
+
27
+ # The attributes of the suppression rule.
28
+ attr_accessor :suppression
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
+ :'changes' => :'changes',
37
+ :'suppression' => :'suppression'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'changes' => :'Array<VersionHistoryUpdate>',
46
+ :'suppression' => :'SecurityMonitoringSuppressionAttributes'
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::SuppressionVersions` 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?(:'changes')
69
+ if (value = attributes[:'changes']).is_a?(Array)
70
+ self.changes = value
71
+ end
72
+ end
73
+
74
+ if attributes.key?(:'suppression')
75
+ self.suppression = attributes[:'suppression']
76
+ end
77
+ end
78
+
79
+ # Returns the object in the form of hash, with additionalProperties support.
80
+ # @return [Hash] Returns the object in the form of hash
81
+ # @!visibility private
82
+ def to_hash
83
+ hash = {}
84
+ self.class.attribute_map.each_pair do |attr, param|
85
+ value = self.send(attr)
86
+ if value.nil?
87
+ is_nullable = self.class.openapi_nullable.include?(attr)
88
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
89
+ end
90
+
91
+ hash[param] = _to_hash(value)
92
+ end
93
+ self.additional_properties.each_pair do |attr, value|
94
+ hash[attr] = value
95
+ end
96
+ hash
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param o [Object] Object to be compared
101
+ # @!visibility private
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ changes == o.changes &&
106
+ suppression == o.suppression &&
107
+ additional_properties == o.additional_properties
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ # @!visibility private
113
+ def hash
114
+ [changes, suppression, additional_properties].hash
115
+ end
116
+ end
117
+ end
@@ -18,7 +18,7 @@ require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
20
  # A change in a rule version.
21
- class RuleVersionUpdate
21
+ class VersionHistoryUpdate
22
22
  include BaseGenericModel
23
23
 
24
24
  # The new value of the field.
@@ -48,7 +48,7 @@ module DatadogAPIClient::V2
48
48
  {
49
49
  :'change' => :'String',
50
50
  :'field' => :'String',
51
- :'type' => :'RuleVersionUpdateType'
51
+ :'type' => :'VersionHistoryUpdateType'
52
52
  }
53
53
  end
54
54
 
@@ -57,7 +57,7 @@ module DatadogAPIClient::V2
57
57
  # @!visibility private
58
58
  def initialize(attributes = {})
59
59
  if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RuleVersionUpdate` initialize method"
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::VersionHistoryUpdate` initialize method"
61
61
  end
62
62
 
63
63
  self.additional_properties = {}
@@ -18,7 +18,7 @@ require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
20
  # The type of change.
21
- class RuleVersionUpdateType
21
+ class VersionHistoryUpdateType
22
22
  include BaseEnumModel
23
23
 
24
24
  CREATE = "create".freeze
@@ -75,6 +75,9 @@ module DatadogAPIClient::V2
75
75
  # Vulnerability risks.
76
76
  attr_reader :risks
77
77
 
78
+ # True if the vulnerability affects a package in the host’s running kernel, false if it affects a non-running kernel, and omit if it is not kernel-related.
79
+ attr_accessor :running_kernel
80
+
78
81
  # The vulnerability status.
79
82
  attr_reader :status
80
83
 
@@ -111,6 +114,7 @@ module DatadogAPIClient::V2
111
114
  :'remediations' => :'remediations',
112
115
  :'repo_digests' => :'repo_digests',
113
116
  :'risks' => :'risks',
117
+ :'running_kernel' => :'running_kernel',
114
118
  :'status' => :'status',
115
119
  :'title' => :'title',
116
120
  :'tool' => :'tool',
@@ -140,6 +144,7 @@ module DatadogAPIClient::V2
140
144
  :'remediations' => :'Array<Remediation>',
141
145
  :'repo_digests' => :'Array<String>',
142
146
  :'risks' => :'VulnerabilityRisks',
147
+ :'running_kernel' => :'Boolean',
143
148
  :'status' => :'VulnerabilityStatus',
144
149
  :'title' => :'String',
145
150
  :'tool' => :'VulnerabilityTool',
@@ -245,6 +250,10 @@ module DatadogAPIClient::V2
245
250
  self.risks = attributes[:'risks']
246
251
  end
247
252
 
253
+ if attributes.key?(:'running_kernel')
254
+ self.running_kernel = attributes[:'running_kernel']
255
+ end
256
+
248
257
  if attributes.key?(:'status')
249
258
  self.status = attributes[:'status']
250
259
  end
@@ -478,6 +487,7 @@ module DatadogAPIClient::V2
478
487
  remediations == o.remediations &&
479
488
  repo_digests == o.repo_digests &&
480
489
  risks == o.risks &&
490
+ running_kernel == o.running_kernel &&
481
491
  status == o.status &&
482
492
  title == o.title &&
483
493
  tool == o.tool &&
@@ -489,7 +499,7 @@ module DatadogAPIClient::V2
489
499
  # @return [Integer] Hash code
490
500
  # @!visibility private
491
501
  def hash
492
- [advisory, advisory_id, code_location, cve_list, cvss, dependency_locations, description, ecosystem, exposure_time, first_detection, fix_available, language, last_detection, library, origin, remediations, repo_digests, risks, status, title, tool, type, additional_properties].hash
502
+ [advisory, advisory_id, code_location, cve_list, cvss, dependency_locations, description, ecosystem, exposure_time, first_detection, fix_available, language, last_detection, library, origin, remediations, repo_digests, risks, running_kernel, status, title, tool, type, additional_properties].hash
493
503
  end
494
504
  end
495
505
  end