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
@@ -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
+ # Data for creating an on-call notification channel
21
+ class CreateNotificationChannelData
22
+ include BaseGenericModel
23
+
24
+ # Attributes for creating an on-call notification channel.
25
+ attr_accessor :attributes
26
+
27
+ # Indicates that the resource is of type 'notification_channels'.
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' => :'CreateNotificationChannelAttributes',
46
+ :'type' => :'NotificationChannelType'
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::CreateNotificationChannelData` 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 @type.nil?
82
+ true
83
+ end
84
+
85
+ # Custom attribute writer method with validation
86
+ # @param type [Object] Object to be assigned
87
+ # @!visibility private
88
+ def type=(type)
89
+ if type.nil?
90
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
91
+ end
92
+ @type = type
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
+ attributes == o.attributes &&
122
+ type == o.type &&
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
+ [attributes, type, additional_properties].hash
131
+ end
132
+ end
133
+ 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
+ # Configuration to create a phone notification channel
21
+ class CreatePhoneNotificationChannelConfig
22
+ include BaseGenericModel
23
+
24
+ # The E-164 formatted phone number (e.g. +3371234567)
25
+ attr_reader :number
26
+
27
+ # Indicates that the notification channel is a phone
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
+ :'number' => :'number',
37
+ :'type' => :'type'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'number' => :'String',
46
+ :'type' => :'NotificationChannelPhoneConfigType'
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::CreatePhoneNotificationChannelConfig` 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?(:'number')
69
+ self.number = attributes[:'number']
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 @number.nil?
82
+ return false if @type.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param number [Object] Object to be assigned
88
+ # @!visibility private
89
+ def number=(number)
90
+ if number.nil?
91
+ fail ArgumentError, 'invalid value for "number", number cannot be nil.'
92
+ end
93
+ @number = number
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
+ number == o.number &&
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
+ [number, type, additional_properties].hash
142
+ end
143
+ end
144
+ end
@@ -17,11 +17,11 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # Case linked to the Jira issue.
21
- class CreateJiraIssueRequestDataRelationshipsCase
20
+ # A top-level wrapper for creating a notification channel for a user
21
+ class CreateUserNotificationChannelRequest
22
22
  include BaseGenericModel
23
23
 
24
- # Case linked to the Jira issue.
24
+ # Data for creating an on-call notification channel
25
25
  attr_reader :data
26
26
 
27
27
  attr_accessor :additional_properties
@@ -38,7 +38,7 @@ module DatadogAPIClient::V2
38
38
  # @!visibility private
39
39
  def self.openapi_types
40
40
  {
41
- :'data' => :'CreateJiraIssueRequestDataRelationshipsCaseData'
41
+ :'data' => :'CreateNotificationChannelData'
42
42
  }
43
43
  end
44
44
 
@@ -47,7 +47,7 @@ module DatadogAPIClient::V2
47
47
  # @!visibility private
48
48
  def initialize(attributes = {})
49
49
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCase` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateUserNotificationChannelRequest` initialize method"
51
51
  end
52
52
 
53
53
  self.additional_properties = {}
@@ -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
+ # AWS Cost and Usage Report data export configuration.
21
+ class DataExportConfig
22
+ include BaseGenericModel
23
+
24
+ # Name of the S3 bucket where the Cost and Usage Report is stored.
25
+ attr_accessor :bucket_name
26
+
27
+ # AWS region of the S3 bucket.
28
+ attr_accessor :bucket_region
29
+
30
+ # Name of the Cost and Usage Report.
31
+ attr_accessor :report_name
32
+
33
+ # S3 prefix where the Cost and Usage Report is stored.
34
+ attr_accessor :report_prefix
35
+
36
+ # Type of the Cost and Usage Report.
37
+ attr_accessor :report_type
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
+ :'bucket_name' => :'bucket_name',
46
+ :'bucket_region' => :'bucket_region',
47
+ :'report_name' => :'report_name',
48
+ :'report_prefix' => :'report_prefix',
49
+ :'report_type' => :'report_type'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ # @!visibility private
55
+ def self.openapi_types
56
+ {
57
+ :'bucket_name' => :'String',
58
+ :'bucket_region' => :'String',
59
+ :'report_name' => :'String',
60
+ :'report_prefix' => :'String',
61
+ :'report_type' => :'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::DataExportConfig` 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?(:'bucket_name')
84
+ self.bucket_name = attributes[:'bucket_name']
85
+ end
86
+
87
+ if attributes.key?(:'bucket_region')
88
+ self.bucket_region = attributes[:'bucket_region']
89
+ end
90
+
91
+ if attributes.key?(:'report_name')
92
+ self.report_name = attributes[:'report_name']
93
+ end
94
+
95
+ if attributes.key?(:'report_prefix')
96
+ self.report_prefix = attributes[:'report_prefix']
97
+ end
98
+
99
+ if attributes.key?(:'report_type')
100
+ self.report_type = attributes[:'report_type']
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
+ bucket_name == o.bucket_name &&
131
+ bucket_region == o.bucket_region &&
132
+ report_name == o.report_name &&
133
+ report_prefix == o.report_prefix &&
134
+ report_type == o.report_type &&
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
+ [bucket_name, bucket_region, report_name, report_prefix, report_type, additional_properties].hash
143
+ end
144
+ end
145
+ end
@@ -0,0 +1,105 @@
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 for a deployment gate rules.
21
+ class DeploymentGateRulesResponse
22
+ include BaseGenericModel
23
+
24
+ # Data for a list of deployment rules.
25
+ attr_accessor :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' => :'ListDeploymentRuleResponseData'
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::DeploymentGateRulesResponse` 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
+ # Returns the object in the form of hash, with additionalProperties support.
69
+ # @return [Hash] Returns the object in the form of hash
70
+ # @!visibility private
71
+ def to_hash
72
+ hash = {}
73
+ self.class.attribute_map.each_pair do |attr, param|
74
+ value = self.send(attr)
75
+ if value.nil?
76
+ is_nullable = self.class.openapi_nullable.include?(attr)
77
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78
+ end
79
+
80
+ hash[param] = _to_hash(value)
81
+ end
82
+ self.additional_properties.each_pair do |attr, value|
83
+ hash[attr] = value
84
+ end
85
+ hash
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
+ data == o.data &&
95
+ additional_properties == o.additional_properties
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ # @!visibility private
101
+ def hash
102
+ [data, additional_properties].hash
103
+ end
104
+ end
105
+ end
@@ -21,9 +21,6 @@ module DatadogAPIClient::V2
21
21
  class DetachCaseRequestData
22
22
  include BaseGenericModel
23
23
 
24
- # The unique identifier of the detachment request.
25
- attr_accessor :id
26
-
27
24
  # Relationships detaching security findings from their case.
28
25
  attr_accessor :relationships
29
26
 
@@ -36,7 +33,6 @@ module DatadogAPIClient::V2
36
33
  # @!visibility private
37
34
  def self.attribute_map
38
35
  {
39
- :'id' => :'id',
40
36
  :'relationships' => :'relationships',
41
37
  :'type' => :'type'
42
38
  }
@@ -46,7 +42,6 @@ module DatadogAPIClient::V2
46
42
  # @!visibility private
47
43
  def self.openapi_types
48
44
  {
49
- :'id' => :'String',
50
45
  :'relationships' => :'DetachCaseRequestDataRelationships',
51
46
  :'type' => :'CaseDataType'
52
47
  }
@@ -70,10 +65,6 @@ module DatadogAPIClient::V2
70
65
  end
71
66
  }
72
67
 
73
- if attributes.key?(:'id')
74
- self.id = attributes[:'id']
75
- end
76
-
77
68
  if attributes.key?(:'relationships')
78
69
  self.relationships = attributes[:'relationships']
79
70
  end
@@ -127,7 +118,6 @@ module DatadogAPIClient::V2
127
118
  def ==(o)
128
119
  return true if self.equal?(o)
129
120
  self.class == o.class &&
130
- id == o.id &&
131
121
  relationships == o.relationships &&
132
122
  type == o.type &&
133
123
  additional_properties == o.additional_properties
@@ -137,7 +127,7 @@ module DatadogAPIClient::V2
137
127
  # @return [Integer] Hash code
138
128
  # @!visibility private
139
129
  def hash
140
- [id, relationships, type, additional_properties].hash
130
+ [relationships, type, additional_properties].hash
141
131
  end
142
132
  end
143
133
  end
@@ -30,6 +30,9 @@ module DatadogAPIClient::V2
30
30
  # Event category identifying the type of event.
31
31
  attr_reader :category
32
32
 
33
+ # Host name to associate with the event. Any tags associated with the host are also applied to this event. Limited to 255 characters.
34
+ attr_reader :host
35
+
33
36
  # Integration ID sourced from integration manifests.
34
37
  attr_accessor :integration_id
35
38
 
@@ -55,6 +58,7 @@ module DatadogAPIClient::V2
55
58
  :'aggregation_key' => :'aggregation_key',
56
59
  :'attributes' => :'attributes',
57
60
  :'category' => :'category',
61
+ :'host' => :'host',
58
62
  :'integration_id' => :'integration_id',
59
63
  :'message' => :'message',
60
64
  :'tags' => :'tags',
@@ -70,6 +74,7 @@ module DatadogAPIClient::V2
70
74
  :'aggregation_key' => :'String',
71
75
  :'attributes' => :'EventPayloadAttributes',
72
76
  :'category' => :'EventCategory',
77
+ :'host' => :'String',
73
78
  :'integration_id' => :'EventPayloadIntegrationId',
74
79
  :'message' => :'String',
75
80
  :'tags' => :'Array<String>',
@@ -106,6 +111,10 @@ module DatadogAPIClient::V2
106
111
  self.category = attributes[:'category']
107
112
  end
108
113
 
114
+ if attributes.key?(:'host')
115
+ self.host = attributes[:'host']
116
+ end
117
+
109
118
  if attributes.key?(:'integration_id')
110
119
  self.integration_id = attributes[:'integration_id']
111
120
  end
@@ -137,6 +146,8 @@ module DatadogAPIClient::V2
137
146
  return false if !@aggregation_key.nil? && @aggregation_key.to_s.length < 1
138
147
  return false if @attributes.nil?
139
148
  return false if @category.nil?
149
+ return false if !@host.nil? && @host.to_s.length > 255
150
+ return false if !@host.nil? && @host.to_s.length < 1
140
151
  return false if !@message.nil? && @message.to_s.length > 4000
141
152
  return false if !@message.nil? && @message.to_s.length < 1
142
153
  return false if !@tags.nil? && @tags.length > 100
@@ -180,6 +191,19 @@ module DatadogAPIClient::V2
180
191
  @category = category
181
192
  end
182
193
 
194
+ # Custom attribute writer method with validation
195
+ # @param host [Object] Object to be assigned
196
+ # @!visibility private
197
+ def host=(host)
198
+ if !host.nil? && host.to_s.length > 255
199
+ fail ArgumentError, 'invalid value for "host", the character length must be smaller than or equal to 255.'
200
+ end
201
+ if !host.nil? && host.to_s.length < 1
202
+ fail ArgumentError, 'invalid value for "host", the character length must be great than or equal to 1.'
203
+ end
204
+ @host = host
205
+ end
206
+
183
207
  # Custom attribute writer method with validation
184
208
  # @param message [Object] Object to be assigned
185
209
  # @!visibility private
@@ -231,6 +255,7 @@ module DatadogAPIClient::V2
231
255
  aggregation_key == o.aggregation_key &&
232
256
  attributes == o.attributes &&
233
257
  category == o.category &&
258
+ host == o.host &&
234
259
  integration_id == o.integration_id &&
235
260
  message == o.message &&
236
261
  tags == o.tags &&
@@ -242,7 +267,7 @@ module DatadogAPIClient::V2
242
267
  # @return [Integer] Hash code
243
268
  # @!visibility private
244
269
  def hash
245
- [aggregation_key, attributes, category, integration_id, message, tags, timestamp, title].hash
270
+ [aggregation_key, attributes, category, host, integration_id, message, tags, timestamp, title].hash
246
271
  end
247
272
  end
248
273
  end
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Attributes of the case.
25
25
  attr_accessor :attributes
26
26
 
27
- # The unique identifier of the case.
27
+ # Unique identifier of the case.
28
28
  attr_accessor :id
29
29
 
30
30
  # Relationships of the case.