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.
- checksums.yaml +4 -4
- data/.generator/schemas/v1/openapi.yaml +105 -7
- data/.generator/schemas/v2/openapi.yaml +1285 -324
- data/CHANGELOG.md +26 -0
- data/examples/v1/dashboards/CreateDashboard_3685886950.rb +36 -0
- data/examples/v1/dashboards/CreateDashboard_865807520.rb +36 -0
- data/examples/v1/dashboards/CreateDashboard_9836563.rb +118 -0
- data/examples/v2/apm/GetServiceList.rb +5 -0
- data/examples/v2/aws-integration/CreateAWSAccount.rb +11 -0
- data/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb +11 -0
- data/examples/v2/aws-integration/UpdateAWSAccount.rb +11 -0
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +3 -1
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1363354233.rb +1 -1
- data/examples/v2/deployment-gates/GetDeploymentGateRules.rb +11 -0
- data/examples/v2/events/CreateEvent.rb +1 -0
- data/examples/v2/observability-pipelines/CreatePipeline.rb +12 -4
- data/examples/v2/observability-pipelines/UpdatePipeline.rb +12 -4
- data/examples/v2/observability-pipelines/ValidatePipeline.rb +12 -4
- data/examples/v2/on-call/CreateUserNotificationChannel.rb +23 -0
- data/examples/v2/on-call/DeleteUserNotificationChannel.rb +11 -0
- data/examples/v2/on-call/GetUserNotificationChannel.rb +11 -0
- data/examples/v2/on-call/ListUserNotificationChannels.rb +8 -0
- data/examples/v2/security-monitoring/CreateCases.rb +2 -2
- data/examples/v2/security-monitoring/CreateCases_2385516013.rb +1 -1
- data/examples/v2/security-monitoring/CreateCases_2798851680.rb +2 -2
- data/examples/v2/security-monitoring/CreateJiraIssues.rb +14 -69
- data/examples/v2/security-monitoring/GetSecretsRules.rb +1 -1
- data/examples/v2/security-monitoring/GetSuppressionVersionHistory.rb +8 -0
- data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule_2609327779.rb +54 -0
- data/lib/datadog_api_client/configuration.rb +4 -3
- data/lib/datadog_api_client/inflector.rb +43 -6
- data/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb +13 -3
- data/lib/datadog_api_client/v1/models/formula_and_function_metric_semantic_mode.rb +27 -0
- data/lib/datadog_api_client/v1/models/geomap_widget_definition.rb +4 -5
- data/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb +1 -1
- data/lib/datadog_api_client/v1/models/geomap_widget_request.rb +37 -3
- data/lib/datadog_api_client/v1/models/geomap_widget_request_style.rb +105 -0
- data/lib/datadog_api_client/v1/models/monitor_search_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
- data/lib/datadog_api_client/v2/api/apm_api.rb +83 -0
- data/lib/datadog_api_client/v2/api/deployment_gates_api.rb +71 -0
- data/lib/datadog_api_client/v2/api/incidents_api.rb +0 -18
- data/lib/datadog_api_client/v2/api/on_call_api.rb +277 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +99 -11
- data/lib/datadog_api_client/v2/api/teams_api.rb +6 -0
- data/lib/datadog_api_client/v2/models/attach_case_request_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data.rb +1 -11
- data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/aws_account_create_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/aws_account_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/aws_account_update_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/awsccm_config.rb +107 -0
- data/lib/datadog_api_client/v2/models/case_insights_items.rb +3 -3
- data/lib/datadog_api_client/v2/models/case_management_project_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_version.rb +2 -2
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +2 -2
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_hash.rb +105 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +1 -1
- 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
- data/lib/datadog_api_client/v2/models/create_case_request_data.rb +1 -11
- data/lib/datadog_api_client/v2/models/create_case_request_data_attributes.rb +3 -3
- data/lib/datadog_api_client/v2/models/create_email_notification_channel_config.rb +167 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_array.rb +3 -15
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data.rb +1 -11
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes.rb +43 -3
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships.rb +35 -14
- data/lib/datadog_api_client/v2/models/create_notification_channel_attributes.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_notification_channel_config.rb +63 -0
- data/lib/datadog_api_client/v2/models/create_notification_channel_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/create_phone_notification_channel_config.rb +144 -0
- data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_relationships_case.rb → create_user_notification_channel_request.rb} +5 -5
- data/lib/datadog_api_client/v2/models/data_export_config.rb +145 -0
- data/lib/datadog_api_client/v2/models/deployment_gate_rules_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/detach_case_request_data.rb +1 -11
- data/lib/datadog_api_client/v2/models/event_payload.rb +26 -1
- data/lib/datadog_api_client/v2/models/finding_case_response_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/finding_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/finding_jira_issue.rb +2 -2
- data/lib/datadog_api_client/v2/models/finding_jira_issue_result.rb +4 -4
- data/lib/datadog_api_client/v2/models/get_suppression_version_history_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/get_suppression_version_history_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/get_suppression_version_history_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/library.rb +13 -1
- data/lib/datadog_api_client/v2/models/list_deployment_rule_response_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/list_deployment_rules_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_attributes_fields.rb → list_deployment_rules_response_data_attributes.rb} +12 -10
- data/lib/datadog_api_client/v2/models/list_notification_channels_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/notification_channel.rb +105 -0
- data/lib/datadog_api_client/v2/models/notification_channel_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/notification_channel_config.rb +64 -0
- data/lib/datadog_api_client/v2/models/notification_channel_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/notification_channel_email_config.rb +167 -0
- data/lib/datadog_api_client/v2/models/notification_channel_email_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/notification_channel_email_format_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/notification_channel_phone_config.rb +225 -0
- data/lib/datadog_api_client/v2/models/notification_channel_phone_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/notification_channel_push_config.rb +165 -0
- data/lib/datadog_api_client/v2/models/notification_channel_push_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/notification_channel_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_config.rb +2 -2
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb +211 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor_remap.rb +1 -12
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb +24 -48
- data/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +18 -31
- data/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb +22 -24
- data/lib/datadog_api_client/v2/models/rule_versions.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +11 -1
- data/lib/datadog_api_client/v2/models/service_list.rb +105 -0
- data/lib/datadog_api_client/v2/models/{create_jira_issue_request_data_relationships_case_data.rb → service_list_data.rb} +17 -18
- data/lib/datadog_api_client/v2/models/service_list_data_attributes.rb +119 -0
- data/lib/datadog_api_client/v2/models/service_list_data_attributes_metadata_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/service_list_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/suppression_version_history.rb +133 -0
- data/lib/datadog_api_client/v2/models/suppression_versions.rb +117 -0
- data/lib/datadog_api_client/v2/models/{rule_version_update.rb → version_history_update.rb} +3 -3
- data/lib/datadog_api_client/v2/models/{rule_version_update_type.rb → version_history_update_type.rb} +1 -1
- data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/vulnerability_ecosystem.rb +6 -1
- data/lib/datadog_api_client/v2/models/vulnerability_tool.rb +1 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +55 -9
- data/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb +0 -56
- data/examples/v2/security-monitoring/CreateJiraIssues_829823123.rb +0 -64
|
@@ -0,0 +1,167 @@
|
|
|
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 an e-mail notification channel
|
|
21
|
+
class CreateEmailNotificationChannelConfig
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# The e-mail address to be notified
|
|
25
|
+
attr_reader :address
|
|
26
|
+
|
|
27
|
+
# Preferred content formats for notifications.
|
|
28
|
+
attr_reader :formats
|
|
29
|
+
|
|
30
|
+
# Indicates that the notification channel is an e-mail address
|
|
31
|
+
attr_reader :type
|
|
32
|
+
|
|
33
|
+
attr_accessor :additional_properties
|
|
34
|
+
|
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
+
# @!visibility private
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'address' => :'address',
|
|
40
|
+
:'formats' => :'formats',
|
|
41
|
+
:'type' => :'type'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
# @!visibility private
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'address' => :'String',
|
|
50
|
+
:'formats' => :'Array<NotificationChannelEmailFormatType>',
|
|
51
|
+
:'type' => :'NotificationChannelEmailConfigType'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
57
|
+
# @!visibility private
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateEmailNotificationChannelConfig` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
self.additional_properties = {}
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
67
|
+
self.additional_properties[k.to_sym] = v
|
|
68
|
+
else
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
end
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'address')
|
|
74
|
+
self.address = attributes[:'address']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'formats')
|
|
78
|
+
if (value = attributes[:'formats']).is_a?(Array)
|
|
79
|
+
self.formats = value
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'type')
|
|
84
|
+
self.type = attributes[:'type']
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
# @!visibility private
|
|
91
|
+
def valid?
|
|
92
|
+
return false if @address.nil?
|
|
93
|
+
return false if @formats.nil?
|
|
94
|
+
return false if @type.nil?
|
|
95
|
+
true
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Custom attribute writer method with validation
|
|
99
|
+
# @param address [Object] Object to be assigned
|
|
100
|
+
# @!visibility private
|
|
101
|
+
def address=(address)
|
|
102
|
+
if address.nil?
|
|
103
|
+
fail ArgumentError, 'invalid value for "address", address cannot be nil.'
|
|
104
|
+
end
|
|
105
|
+
@address = address
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param formats [Object] Object to be assigned
|
|
110
|
+
# @!visibility private
|
|
111
|
+
def formats=(formats)
|
|
112
|
+
if formats.nil?
|
|
113
|
+
fail ArgumentError, 'invalid value for "formats", formats cannot be nil.'
|
|
114
|
+
end
|
|
115
|
+
@formats = formats
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param type [Object] Object to be assigned
|
|
120
|
+
# @!visibility private
|
|
121
|
+
def type=(type)
|
|
122
|
+
if type.nil?
|
|
123
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
|
124
|
+
end
|
|
125
|
+
@type = type
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
|
129
|
+
# @return [Hash] Returns the object in the form of hash
|
|
130
|
+
# @!visibility private
|
|
131
|
+
def to_hash
|
|
132
|
+
hash = {}
|
|
133
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
134
|
+
value = self.send(attr)
|
|
135
|
+
if value.nil?
|
|
136
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
137
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
hash[param] = _to_hash(value)
|
|
141
|
+
end
|
|
142
|
+
self.additional_properties.each_pair do |attr, value|
|
|
143
|
+
hash[attr] = value
|
|
144
|
+
end
|
|
145
|
+
hash
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Checks equality by comparing each attribute.
|
|
149
|
+
# @param o [Object] Object to be compared
|
|
150
|
+
# @!visibility private
|
|
151
|
+
def ==(o)
|
|
152
|
+
return true if self.equal?(o)
|
|
153
|
+
self.class == o.class &&
|
|
154
|
+
address == o.address &&
|
|
155
|
+
formats == o.formats &&
|
|
156
|
+
type == o.type &&
|
|
157
|
+
additional_properties == o.additional_properties
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Calculates hash code according to all attributes.
|
|
161
|
+
# @return [Integer] Hash code
|
|
162
|
+
# @!visibility private
|
|
163
|
+
def hash
|
|
164
|
+
[address, formats, type, additional_properties].hash
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -24,17 +24,13 @@ module DatadogAPIClient::V2
|
|
|
24
24
|
#
|
|
25
25
|
attr_reader :data
|
|
26
26
|
|
|
27
|
-
#
|
|
28
|
-
attr_accessor :included
|
|
29
|
-
|
|
30
27
|
attr_accessor :additional_properties
|
|
31
28
|
|
|
32
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
30
|
# @!visibility private
|
|
34
31
|
def self.attribute_map
|
|
35
32
|
{
|
|
36
|
-
:'data' => :'data'
|
|
37
|
-
:'included' => :'included'
|
|
33
|
+
:'data' => :'data'
|
|
38
34
|
}
|
|
39
35
|
end
|
|
40
36
|
|
|
@@ -42,8 +38,7 @@ module DatadogAPIClient::V2
|
|
|
42
38
|
# @!visibility private
|
|
43
39
|
def self.openapi_types
|
|
44
40
|
{
|
|
45
|
-
:'data' => :'Array<CreateJiraIssueRequestData>'
|
|
46
|
-
:'included' => :'Array<CreateJiraIssueRequestArrayIncluded>'
|
|
41
|
+
:'data' => :'Array<CreateJiraIssueRequestData>'
|
|
47
42
|
}
|
|
48
43
|
end
|
|
49
44
|
|
|
@@ -70,12 +65,6 @@ module DatadogAPIClient::V2
|
|
|
70
65
|
self.data = value
|
|
71
66
|
end
|
|
72
67
|
end
|
|
73
|
-
|
|
74
|
-
if attributes.key?(:'included')
|
|
75
|
-
if (value = attributes[:'included']).is_a?(Array)
|
|
76
|
-
self.included = value
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
68
|
end
|
|
80
69
|
|
|
81
70
|
# Check to see if the all the properties in the model are valid
|
|
@@ -123,7 +112,6 @@ module DatadogAPIClient::V2
|
|
|
123
112
|
return true if self.equal?(o)
|
|
124
113
|
self.class == o.class &&
|
|
125
114
|
data == o.data &&
|
|
126
|
-
included == o.included &&
|
|
127
115
|
additional_properties == o.additional_properties
|
|
128
116
|
end
|
|
129
117
|
|
|
@@ -131,7 +119,7 @@ module DatadogAPIClient::V2
|
|
|
131
119
|
# @return [Integer] Hash code
|
|
132
120
|
# @!visibility private
|
|
133
121
|
def hash
|
|
134
|
-
[data,
|
|
122
|
+
[data, additional_properties].hash
|
|
135
123
|
end
|
|
136
124
|
end
|
|
137
125
|
end
|
|
@@ -24,9 +24,6 @@ module DatadogAPIClient::V2
|
|
|
24
24
|
# Attributes of the Jira issue to create.
|
|
25
25
|
attr_accessor :attributes
|
|
26
26
|
|
|
27
|
-
# The unique identifier of the Jira issue creation request.
|
|
28
|
-
attr_accessor :id
|
|
29
|
-
|
|
30
27
|
# Relationships of the Jira issue to create.
|
|
31
28
|
attr_accessor :relationships
|
|
32
29
|
|
|
@@ -40,7 +37,6 @@ module DatadogAPIClient::V2
|
|
|
40
37
|
def self.attribute_map
|
|
41
38
|
{
|
|
42
39
|
:'attributes' => :'attributes',
|
|
43
|
-
:'id' => :'id',
|
|
44
40
|
:'relationships' => :'relationships',
|
|
45
41
|
:'type' => :'type'
|
|
46
42
|
}
|
|
@@ -51,7 +47,6 @@ module DatadogAPIClient::V2
|
|
|
51
47
|
def self.openapi_types
|
|
52
48
|
{
|
|
53
49
|
:'attributes' => :'CreateJiraIssueRequestDataAttributes',
|
|
54
|
-
:'id' => :'String',
|
|
55
50
|
:'relationships' => :'CreateJiraIssueRequestDataRelationships',
|
|
56
51
|
:'type' => :'JiraIssuesDataType'
|
|
57
52
|
}
|
|
@@ -79,10 +74,6 @@ module DatadogAPIClient::V2
|
|
|
79
74
|
self.attributes = attributes[:'attributes']
|
|
80
75
|
end
|
|
81
76
|
|
|
82
|
-
if attributes.key?(:'id')
|
|
83
|
-
self.id = attributes[:'id']
|
|
84
|
-
end
|
|
85
|
-
|
|
86
77
|
if attributes.key?(:'relationships')
|
|
87
78
|
self.relationships = attributes[:'relationships']
|
|
88
79
|
end
|
|
@@ -137,7 +128,6 @@ module DatadogAPIClient::V2
|
|
|
137
128
|
return true if self.equal?(o)
|
|
138
129
|
self.class == o.class &&
|
|
139
130
|
attributes == o.attributes &&
|
|
140
|
-
id == o.id &&
|
|
141
131
|
relationships == o.relationships &&
|
|
142
132
|
type == o.type &&
|
|
143
133
|
additional_properties == o.additional_properties
|
|
@@ -147,7 +137,7 @@ module DatadogAPIClient::V2
|
|
|
147
137
|
# @return [Integer] Hash code
|
|
148
138
|
# @!visibility private
|
|
149
139
|
def hash
|
|
150
|
-
[attributes,
|
|
140
|
+
[attributes, relationships, type, additional_properties].hash
|
|
151
141
|
end
|
|
152
142
|
end
|
|
153
143
|
end
|
|
@@ -21,16 +21,32 @@ module DatadogAPIClient::V2
|
|
|
21
21
|
class CreateJiraIssueRequestDataAttributes
|
|
22
22
|
include BaseGenericModel
|
|
23
23
|
|
|
24
|
+
# Unique identifier of the user assigned to the Jira issue.
|
|
25
|
+
attr_accessor :assignee_id
|
|
26
|
+
|
|
27
|
+
# Description of the Jira issue. If not provided, the description will be automatically generated.
|
|
28
|
+
attr_accessor :description
|
|
29
|
+
|
|
24
30
|
# Custom fields of the Jira issue to create. For the list of available fields, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get).
|
|
25
31
|
attr_accessor :fields
|
|
26
32
|
|
|
33
|
+
# Case priority
|
|
34
|
+
attr_accessor :priority
|
|
35
|
+
|
|
36
|
+
# Title of the Jira issue. If not provided, the title will be automatically generated.
|
|
37
|
+
attr_accessor :title
|
|
38
|
+
|
|
27
39
|
attr_accessor :additional_properties
|
|
28
40
|
|
|
29
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
42
|
# @!visibility private
|
|
31
43
|
def self.attribute_map
|
|
32
44
|
{
|
|
33
|
-
:'
|
|
45
|
+
:'assignee_id' => :'assignee_id',
|
|
46
|
+
:'description' => :'description',
|
|
47
|
+
:'fields' => :'fields',
|
|
48
|
+
:'priority' => :'priority',
|
|
49
|
+
:'title' => :'title'
|
|
34
50
|
}
|
|
35
51
|
end
|
|
36
52
|
|
|
@@ -38,7 +54,11 @@ module DatadogAPIClient::V2
|
|
|
38
54
|
# @!visibility private
|
|
39
55
|
def self.openapi_types
|
|
40
56
|
{
|
|
41
|
-
:'
|
|
57
|
+
:'assignee_id' => :'String',
|
|
58
|
+
:'description' => :'String',
|
|
59
|
+
:'fields' => :'Hash<String, Object>',
|
|
60
|
+
:'priority' => :'CasePriority',
|
|
61
|
+
:'title' => :'String'
|
|
42
62
|
}
|
|
43
63
|
end
|
|
44
64
|
|
|
@@ -60,9 +80,25 @@ module DatadogAPIClient::V2
|
|
|
60
80
|
end
|
|
61
81
|
}
|
|
62
82
|
|
|
83
|
+
if attributes.key?(:'assignee_id')
|
|
84
|
+
self.assignee_id = attributes[:'assignee_id']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'description')
|
|
88
|
+
self.description = attributes[:'description']
|
|
89
|
+
end
|
|
90
|
+
|
|
63
91
|
if attributes.key?(:'fields')
|
|
64
92
|
self.fields = attributes[:'fields']
|
|
65
93
|
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'priority')
|
|
96
|
+
self.priority = attributes[:'priority']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'title')
|
|
100
|
+
self.title = attributes[:'title']
|
|
101
|
+
end
|
|
66
102
|
end
|
|
67
103
|
|
|
68
104
|
# Returns the object in the form of hash, with additionalProperties support.
|
|
@@ -91,7 +127,11 @@ module DatadogAPIClient::V2
|
|
|
91
127
|
def ==(o)
|
|
92
128
|
return true if self.equal?(o)
|
|
93
129
|
self.class == o.class &&
|
|
130
|
+
assignee_id == o.assignee_id &&
|
|
131
|
+
description == o.description &&
|
|
94
132
|
fields == o.fields &&
|
|
133
|
+
priority == o.priority &&
|
|
134
|
+
title == o.title &&
|
|
95
135
|
additional_properties == o.additional_properties
|
|
96
136
|
end
|
|
97
137
|
|
|
@@ -99,7 +139,7 @@ module DatadogAPIClient::V2
|
|
|
99
139
|
# @return [Integer] Hash code
|
|
100
140
|
# @!visibility private
|
|
101
141
|
def hash
|
|
102
|
-
[fields, additional_properties].hash
|
|
142
|
+
[assignee_id, description, fields, priority, title, additional_properties].hash
|
|
103
143
|
end
|
|
104
144
|
end
|
|
105
145
|
end
|
|
@@ -21,8 +21,11 @@ module DatadogAPIClient::V2
|
|
|
21
21
|
class CreateJiraIssueRequestDataRelationships
|
|
22
22
|
include BaseGenericModel
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
attr_reader :
|
|
24
|
+
# A list of security findings.
|
|
25
|
+
attr_reader :findings
|
|
26
|
+
|
|
27
|
+
# Case management project.
|
|
28
|
+
attr_reader :project
|
|
26
29
|
|
|
27
30
|
attr_accessor :additional_properties
|
|
28
31
|
|
|
@@ -30,7 +33,8 @@ module DatadogAPIClient::V2
|
|
|
30
33
|
# @!visibility private
|
|
31
34
|
def self.attribute_map
|
|
32
35
|
{
|
|
33
|
-
:'
|
|
36
|
+
:'findings' => :'findings',
|
|
37
|
+
:'project' => :'project'
|
|
34
38
|
}
|
|
35
39
|
end
|
|
36
40
|
|
|
@@ -38,7 +42,8 @@ module DatadogAPIClient::V2
|
|
|
38
42
|
# @!visibility private
|
|
39
43
|
def self.openapi_types
|
|
40
44
|
{
|
|
41
|
-
:'
|
|
45
|
+
:'findings' => :'Findings',
|
|
46
|
+
:'project' => :'CaseManagementProject'
|
|
42
47
|
}
|
|
43
48
|
end
|
|
44
49
|
|
|
@@ -60,8 +65,12 @@ module DatadogAPIClient::V2
|
|
|
60
65
|
end
|
|
61
66
|
}
|
|
62
67
|
|
|
63
|
-
if attributes.key?(:'
|
|
64
|
-
self.
|
|
68
|
+
if attributes.key?(:'findings')
|
|
69
|
+
self.findings = attributes[:'findings']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'project')
|
|
73
|
+
self.project = attributes[:'project']
|
|
65
74
|
end
|
|
66
75
|
end
|
|
67
76
|
|
|
@@ -69,18 +78,29 @@ module DatadogAPIClient::V2
|
|
|
69
78
|
# @return true if the model is valid
|
|
70
79
|
# @!visibility private
|
|
71
80
|
def valid?
|
|
72
|
-
return false if @
|
|
81
|
+
return false if @findings.nil?
|
|
82
|
+
return false if @project.nil?
|
|
73
83
|
true
|
|
74
84
|
end
|
|
75
85
|
|
|
76
86
|
# Custom attribute writer method with validation
|
|
77
|
-
# @param
|
|
87
|
+
# @param findings [Object] Object to be assigned
|
|
88
|
+
# @!visibility private
|
|
89
|
+
def findings=(findings)
|
|
90
|
+
if findings.nil?
|
|
91
|
+
fail ArgumentError, 'invalid value for "findings", findings cannot be nil.'
|
|
92
|
+
end
|
|
93
|
+
@findings = findings
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Custom attribute writer method with validation
|
|
97
|
+
# @param project [Object] Object to be assigned
|
|
78
98
|
# @!visibility private
|
|
79
|
-
def
|
|
80
|
-
if
|
|
81
|
-
fail ArgumentError, 'invalid value for "
|
|
99
|
+
def project=(project)
|
|
100
|
+
if project.nil?
|
|
101
|
+
fail ArgumentError, 'invalid value for "project", project cannot be nil.'
|
|
82
102
|
end
|
|
83
|
-
@
|
|
103
|
+
@project = project
|
|
84
104
|
end
|
|
85
105
|
|
|
86
106
|
# Returns the object in the form of hash, with additionalProperties support.
|
|
@@ -109,7 +129,8 @@ module DatadogAPIClient::V2
|
|
|
109
129
|
def ==(o)
|
|
110
130
|
return true if self.equal?(o)
|
|
111
131
|
self.class == o.class &&
|
|
112
|
-
|
|
132
|
+
findings == o.findings &&
|
|
133
|
+
project == o.project &&
|
|
113
134
|
additional_properties == o.additional_properties
|
|
114
135
|
end
|
|
115
136
|
|
|
@@ -117,7 +138,7 @@ module DatadogAPIClient::V2
|
|
|
117
138
|
# @return [Integer] Hash code
|
|
118
139
|
# @!visibility private
|
|
119
140
|
def hash
|
|
120
|
-
[
|
|
141
|
+
[findings, project, additional_properties].hash
|
|
121
142
|
end
|
|
122
143
|
end
|
|
123
144
|
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
|
+
# Attributes for creating an on-call notification channel.
|
|
21
|
+
class CreateNotificationChannelAttributes
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Defines the configuration for creating an On-Call notification channel
|
|
25
|
+
attr_accessor :config
|
|
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
|
+
:'config' => :'config'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
# @!visibility private
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'config' => :'CreateNotificationChannelConfig'
|
|
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::CreateNotificationChannelAttributes` 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?(:'config')
|
|
64
|
+
self.config = attributes[:'config']
|
|
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
|
+
config == o.config &&
|
|
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
|
+
[config, additional_properties].hash
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
# Defines the configuration for creating an On-Call notification channel
|
|
21
|
+
module CreateNotificationChannelConfig
|
|
22
|
+
class << self
|
|
23
|
+
include BaseOneOfModel
|
|
24
|
+
include BaseOneOfModelNoDiscriminator
|
|
25
|
+
|
|
26
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
27
|
+
def openapi_one_of
|
|
28
|
+
[
|
|
29
|
+
:'CreatePhoneNotificationChannelConfig',
|
|
30
|
+
:'CreateEmailNotificationChannelConfig'
|
|
31
|
+
]
|
|
32
|
+
end
|
|
33
|
+
# Builds the object
|
|
34
|
+
# @param data [Mixed] Data to be matched against the list of oneOf items
|
|
35
|
+
# @return [Object] Returns the model or the data itself
|
|
36
|
+
def build(data)
|
|
37
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
38
|
+
# Note:
|
|
39
|
+
# - We do not attempt to check whether exactly one item matches.
|
|
40
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
41
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
42
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
43
|
+
# - TODO: logging when debugging is set.
|
|
44
|
+
openapi_one_of.each do |klass|
|
|
45
|
+
begin
|
|
46
|
+
next if klass == :AnyType # "nullable: true"
|
|
47
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
48
|
+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
|
|
49
|
+
return typed_data if typed_data
|
|
50
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
if openapi_one_of.include?(:AnyType)
|
|
55
|
+
data
|
|
56
|
+
else
|
|
57
|
+
self._unparsed = true
|
|
58
|
+
DatadogAPIClient::UnparsedObject.new(data)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|