datadog_api_client 2.0.2 → 2.2.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/.apigentools-info +6 -6
- data/.generator/poetry.lock +21 -14
- data/.generator/pyproject.toml +1 -1
- data/.generator/schemas/v1/openapi.yaml +840 -908
- data/.generator/schemas/v2/openapi.yaml +1304 -913
- data/.generator/src/generator/formatter.py +1 -1
- data/.generator/src/generator/templates/api_client.j2 +5 -1
- data/.generator/src/generator/templates/configuration.j2 +17 -0
- data/.github/workflows/test.yml +4 -1
- data/.github/workflows/test_integration.yml +5 -0
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +49 -0
- data/README.md +11 -0
- data/examples/v1/dashboards/CreateDashboard_1094917386.rb +37 -0
- data/examples/v1/dashboards/CreateDashboard_1307120899.rb +61 -0
- data/examples/v1/dashboards/CreateDashboard_1423904722.rb +38 -0
- data/examples/v1/dashboards/CreateDashboard_2652180930.rb +43 -0
- data/examples/v1/dashboards/CreateDashboard_2850365602.rb +55 -0
- data/examples/v1/dashboards/CreateDashboard_3117424216.rb +33 -0
- data/examples/v1/dashboards/CreateDashboard_3669695268.rb +50 -0
- data/examples/v1/dashboards/CreateDashboard_858397694.rb +41 -0
- data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor_4247196452.rb +38 -0
- data/examples/v1/synthetics/CreateGlobalVariable.rb +1 -0
- data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +23 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +10 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +6 -0
- data/examples/v1/synthetics/EditGlobalVariable.rb +1 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
- data/examples/v1/usage-metering/GetDailyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetMonthlyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -3
- data/examples/v2/incidents/ListIncidentAttachments.rb +8 -0
- data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +11 -0
- data/examples/v2/incidents/UpdateIncidentAttachments.rb +38 -0
- data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +26 -0
- data/examples/v2/metrics/ListActiveMetricConfigurations.rb +5 -0
- data/examples/v2/metrics/ListTagConfigurations.rb +1 -1
- data/examples/v2/metrics/ListTagConfigurations_265033704.rb +8 -0
- data/examples/v2/metrics/{ListTagConfigurations_103226315.rb → ListTagConfigurations_2739018321.rb} +1 -1
- data/examples/v2/metrics/SubmitMetrics_1762007427.rb +23 -0
- data/examples/v2/roles/UpdateRole.rb +13 -0
- data/examples/v2/rum/CreateRUMApplication.rb +15 -0
- data/examples/v2/rum/DeleteRUMApplication.rb +8 -0
- data/examples/v2/rum/GetRUMApplication.rb +8 -0
- data/examples/v2/rum/GetRUMApplications.rb +5 -0
- data/examples/v2/rum/UpdateRUMApplication.rb +16 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +3 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +50 -0
- data/examples/v2/security-monitoring/GetSecurityMonitoringSignal.rb +5 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +2 -1
- data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +1 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +2 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +2 -4
- data/examples/v2/usage-metering/GetHistoricalCostByOrg.rb +8 -0
- data/examples/v2/usage-metering/GetHourlyUsage.rb +5 -0
- data/generate.sh +30 -0
- data/lib/datadog_api_client/api_client.rb +5 -1
- data/lib/datadog_api_client/configuration.rb +20 -6
- data/lib/datadog_api_client/inflector.rb +67 -1
- data/lib/datadog_api_client/v1/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +42 -62
- data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -2
- data/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +28 -5
- data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +14 -4
- data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/list_stream_query.rb +14 -4
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +28 -1
- data/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb +13 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/on_missing_data_option.rb +33 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective.rb +111 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +286 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +134 -0
- data/lib/datadog_api_client/v1/models/search_slo_query.rb +137 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +8 -8
- data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +2 -0
- data/lib/datadog_api_client/v1/models/search_slo_threshold.rb +184 -0
- data/lib/datadog_api_client/v1/models/search_slo_timeframe.rb +28 -0
- data/lib/datadog_api_client/v1/models/slo_creator.rb +131 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +185 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +149 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +143 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +174 -0
- data/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +121 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_operator.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth.rb +2 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +155 -0
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb +11 -12
- data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +31 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_process_status.rb +0 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +15 -1
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +193 -0
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/topology_query.rb +144 -0
- data/lib/datadog_api_client/v1/models/topology_query_data_source.rb +27 -0
- data/lib/datadog_api_client/v1/models/topology_request.rb +121 -0
- data/lib/datadog_api_client/v1/models/topology_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +4 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +12 -1
- data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +21 -1
- data/lib/datadog_api_client/v1/models/widget_definition.rb +3 -1
- data/lib/datadog_api_client/v1/models/widget_monitor_summary_sort.rb +2 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incident_teams_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incidents_api.rb +155 -0
- data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/metrics_api.rb +77 -9
- data/lib/datadog_api_client/v2/api/rum_api.rb +329 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +68 -3
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
- data/lib/datadog_api_client/v2/models/content_encoding.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_attachment_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_data.rb +187 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_related_object.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +111 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +127 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +137 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response.rb +136 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/incident_related_object.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -11
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +2 -1
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +14 -14
- data/lib/datadog_api_client/v2/models/metric_active_configuration_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_content_encoding.rb +2 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +124 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +145 -0
- data/lib/datadog_api_client/v2/models/role_update_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/rum_application.rb +166 -0
- data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +279 -0
- data/lib/datadog_api_client/v2/models/rum_application_create.rb +145 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/rum_application_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_update.rb +155 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +121 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_applications_response.rb +113 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +36 -248
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +36 -151
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +37 -253
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +187 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +279 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/{security_monitoring_rule_query_create.rb → security_monitoring_standard_rule_query.rb} +3 -3
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +279 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +97 -6
- data/Makefile +0 -7
- data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
# RUM application update request.
|
|
21
|
+
class RUMApplicationUpdateRequest
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# RUM application update.
|
|
29
|
+
attr_accessor :data
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
# @!visibility private
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'data' => :'data'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
# @!visibility private
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
# @!visibility private
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'data' => :'RUMApplicationUpdate'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
# @!visibility private
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
62
|
+
# @!visibility private
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationUpdateRequest` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'data')
|
|
77
|
+
self.data = attributes[:'data']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
# @!visibility private
|
|
84
|
+
def valid?
|
|
85
|
+
return false if @data.nil?
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Custom attribute writer method with validation
|
|
90
|
+
# @param data [Object] Object to be assigned
|
|
91
|
+
# @!visibility private
|
|
92
|
+
def data=(data)
|
|
93
|
+
if data.nil?
|
|
94
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
|
95
|
+
end
|
|
96
|
+
@data = data
|
|
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
|
+
data == o.data
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# @see the `==` method
|
|
109
|
+
# @param o [Object] Object to be compared
|
|
110
|
+
# @!visibility private
|
|
111
|
+
def eql?(o)
|
|
112
|
+
self == o
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Calculates hash code according to all attributes.
|
|
116
|
+
# @return [Integer] Hash code
|
|
117
|
+
# @!visibility private
|
|
118
|
+
def hash
|
|
119
|
+
[data].hash
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
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
|
+
# RUM application update type.
|
|
21
|
+
class RUMApplicationUpdateType
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
RUM_APPLICATION_UPDATE = "rum_application_update".freeze
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
# RUM applications response.
|
|
21
|
+
class RUMApplicationsResponse
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# RUM applications array response.
|
|
29
|
+
attr_accessor :data
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
# @!visibility private
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'data' => :'data'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
# @!visibility private
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
# @!visibility private
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'data' => :'Array<RUMApplication>'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
# @!visibility private
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
62
|
+
# @!visibility private
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationsResponse` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'data')
|
|
77
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
78
|
+
self.data = value
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Check to see if the all the properties in the model are valid
|
|
84
|
+
# @return true if the model is valid
|
|
85
|
+
# @!visibility private
|
|
86
|
+
def valid?
|
|
87
|
+
true
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Checks equality by comparing each attribute.
|
|
91
|
+
# @param o [Object] Object to be compared
|
|
92
|
+
# @!visibility private
|
|
93
|
+
def ==(o)
|
|
94
|
+
return true if self.equal?(o)
|
|
95
|
+
self.class == o.class &&
|
|
96
|
+
data == o.data
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @see the `==` method
|
|
100
|
+
# @param o [Object] Object to be compared
|
|
101
|
+
# @!visibility private
|
|
102
|
+
def eql?(o)
|
|
103
|
+
self == o
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Calculates hash code according to all attributes.
|
|
107
|
+
# @return [Integer] Hash code
|
|
108
|
+
# @!visibility private
|
|
109
|
+
def hash
|
|
110
|
+
[data].hash
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -18,258 +18,46 @@ require 'time'
|
|
|
18
18
|
|
|
19
19
|
module DatadogAPIClient::V2
|
|
20
20
|
# Create a new rule.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
# Tags for generated signals.
|
|
53
|
-
attr_accessor :tags
|
|
54
|
-
|
|
55
|
-
# The rule type.
|
|
56
|
-
attr_accessor :type
|
|
57
|
-
|
|
58
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
59
|
-
# @!visibility private
|
|
60
|
-
def self.attribute_map
|
|
61
|
-
{
|
|
62
|
-
:'cases' => :'cases',
|
|
63
|
-
:'filters' => :'filters',
|
|
64
|
-
:'has_extended_title' => :'hasExtendedTitle',
|
|
65
|
-
:'is_enabled' => :'isEnabled',
|
|
66
|
-
:'message' => :'message',
|
|
67
|
-
:'name' => :'name',
|
|
68
|
-
:'options' => :'options',
|
|
69
|
-
:'queries' => :'queries',
|
|
70
|
-
:'tags' => :'tags',
|
|
71
|
-
:'type' => :'type'
|
|
72
|
-
}
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# Returns all the JSON keys this model knows about
|
|
76
|
-
# @!visibility private
|
|
77
|
-
def self.acceptable_attributes
|
|
78
|
-
attribute_map.values
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# Attribute type mapping.
|
|
82
|
-
# @!visibility private
|
|
83
|
-
def self.openapi_types
|
|
84
|
-
{
|
|
85
|
-
:'cases' => :'Array<SecurityMonitoringRuleCaseCreate>',
|
|
86
|
-
:'filters' => :'Array<SecurityMonitoringFilter>',
|
|
87
|
-
:'has_extended_title' => :'Boolean',
|
|
88
|
-
:'is_enabled' => :'Boolean',
|
|
89
|
-
:'message' => :'String',
|
|
90
|
-
:'name' => :'String',
|
|
91
|
-
:'options' => :'SecurityMonitoringRuleOptions',
|
|
92
|
-
:'queries' => :'Array<SecurityMonitoringRuleQueryCreate>',
|
|
93
|
-
:'tags' => :'Array<String>',
|
|
94
|
-
:'type' => :'SecurityMonitoringRuleTypeCreate'
|
|
95
|
-
}
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
# List of attributes with nullable: true
|
|
99
|
-
# @!visibility private
|
|
100
|
-
def self.openapi_nullable
|
|
101
|
-
Set.new([
|
|
102
|
-
])
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
# Initializes the object
|
|
106
|
-
# @param attributes [Hash] Model attributes in the form of hash
|
|
107
|
-
# @!visibility private
|
|
108
|
-
def initialize(attributes = {})
|
|
109
|
-
if (!attributes.is_a?(Hash))
|
|
110
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload` initialize method"
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
114
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
115
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
116
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
21
|
+
module SecurityMonitoringRuleCreatePayload
|
|
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
|
+
:'SecurityMonitoringStandardRuleCreatePayload',
|
|
30
|
+
:'SecurityMonitoringSignalRuleCreatePayload'
|
|
31
|
+
]
|
|
32
|
+
end
|
|
33
|
+
# Builds the object
|
|
34
|
+
# @param [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._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
|
|
117
52
|
end
|
|
118
|
-
h[k.to_sym] = v
|
|
119
|
-
}
|
|
120
53
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
54
|
+
if openapi_one_of.include?(:AnyType)
|
|
55
|
+
data
|
|
56
|
+
else
|
|
57
|
+
self._unparsed = true
|
|
58
|
+
DatadogAPIClient::UnparsedObject.new(data)
|
|
124
59
|
end
|
|
125
60
|
end
|
|
126
|
-
|
|
127
|
-
if attributes.key?(:'filters')
|
|
128
|
-
if (value = attributes[:'filters']).is_a?(Array)
|
|
129
|
-
self.filters = value
|
|
130
|
-
end
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
if attributes.key?(:'has_extended_title')
|
|
134
|
-
self.has_extended_title = attributes[:'has_extended_title']
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
if attributes.key?(:'is_enabled')
|
|
138
|
-
self.is_enabled = attributes[:'is_enabled']
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
if attributes.key?(:'message')
|
|
142
|
-
self.message = attributes[:'message']
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
if attributes.key?(:'name')
|
|
146
|
-
self.name = attributes[:'name']
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
if attributes.key?(:'options')
|
|
150
|
-
self.options = attributes[:'options']
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
if attributes.key?(:'queries')
|
|
154
|
-
if (value = attributes[:'queries']).is_a?(Array)
|
|
155
|
-
self.queries = value
|
|
156
|
-
end
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
if attributes.key?(:'tags')
|
|
160
|
-
if (value = attributes[:'tags']).is_a?(Array)
|
|
161
|
-
self.tags = value
|
|
162
|
-
end
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
if attributes.key?(:'type')
|
|
166
|
-
self.type = attributes[:'type']
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
# Check to see if the all the properties in the model are valid
|
|
171
|
-
# @return true if the model is valid
|
|
172
|
-
# @!visibility private
|
|
173
|
-
def valid?
|
|
174
|
-
return false if @cases.nil?
|
|
175
|
-
return false if @is_enabled.nil?
|
|
176
|
-
return false if @message.nil?
|
|
177
|
-
return false if @name.nil?
|
|
178
|
-
return false if @options.nil?
|
|
179
|
-
return false if @queries.nil?
|
|
180
|
-
true
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# Custom attribute writer method with validation
|
|
184
|
-
# @param cases [Object] Object to be assigned
|
|
185
|
-
# @!visibility private
|
|
186
|
-
def cases=(cases)
|
|
187
|
-
if cases.nil?
|
|
188
|
-
fail ArgumentError, 'invalid value for "cases", cases cannot be nil.'
|
|
189
|
-
end
|
|
190
|
-
@cases = cases
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
# Custom attribute writer method with validation
|
|
194
|
-
# @param is_enabled [Object] Object to be assigned
|
|
195
|
-
# @!visibility private
|
|
196
|
-
def is_enabled=(is_enabled)
|
|
197
|
-
if is_enabled.nil?
|
|
198
|
-
fail ArgumentError, 'invalid value for "is_enabled", is_enabled cannot be nil.'
|
|
199
|
-
end
|
|
200
|
-
@is_enabled = is_enabled
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
# Custom attribute writer method with validation
|
|
204
|
-
# @param message [Object] Object to be assigned
|
|
205
|
-
# @!visibility private
|
|
206
|
-
def message=(message)
|
|
207
|
-
if message.nil?
|
|
208
|
-
fail ArgumentError, 'invalid value for "message", message cannot be nil.'
|
|
209
|
-
end
|
|
210
|
-
@message = message
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
# Custom attribute writer method with validation
|
|
214
|
-
# @param name [Object] Object to be assigned
|
|
215
|
-
# @!visibility private
|
|
216
|
-
def name=(name)
|
|
217
|
-
if name.nil?
|
|
218
|
-
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
|
219
|
-
end
|
|
220
|
-
@name = name
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
# Custom attribute writer method with validation
|
|
224
|
-
# @param options [Object] Object to be assigned
|
|
225
|
-
# @!visibility private
|
|
226
|
-
def options=(options)
|
|
227
|
-
if options.nil?
|
|
228
|
-
fail ArgumentError, 'invalid value for "options", options cannot be nil.'
|
|
229
|
-
end
|
|
230
|
-
@options = options
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
# Custom attribute writer method with validation
|
|
234
|
-
# @param queries [Object] Object to be assigned
|
|
235
|
-
# @!visibility private
|
|
236
|
-
def queries=(queries)
|
|
237
|
-
if queries.nil?
|
|
238
|
-
fail ArgumentError, 'invalid value for "queries", queries cannot be nil.'
|
|
239
|
-
end
|
|
240
|
-
@queries = queries
|
|
241
|
-
end
|
|
242
|
-
|
|
243
|
-
# Checks equality by comparing each attribute.
|
|
244
|
-
# @param o [Object] Object to be compared
|
|
245
|
-
# @!visibility private
|
|
246
|
-
def ==(o)
|
|
247
|
-
return true if self.equal?(o)
|
|
248
|
-
self.class == o.class &&
|
|
249
|
-
cases == o.cases &&
|
|
250
|
-
filters == o.filters &&
|
|
251
|
-
has_extended_title == o.has_extended_title &&
|
|
252
|
-
is_enabled == o.is_enabled &&
|
|
253
|
-
message == o.message &&
|
|
254
|
-
name == o.name &&
|
|
255
|
-
options == o.options &&
|
|
256
|
-
queries == o.queries &&
|
|
257
|
-
tags == o.tags &&
|
|
258
|
-
type == o.type
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
# @see the `==` method
|
|
262
|
-
# @param o [Object] Object to be compared
|
|
263
|
-
# @!visibility private
|
|
264
|
-
def eql?(o)
|
|
265
|
-
self == o
|
|
266
|
-
end
|
|
267
|
-
|
|
268
|
-
# Calculates hash code according to all attributes.
|
|
269
|
-
# @return [Integer] Hash code
|
|
270
|
-
# @!visibility private
|
|
271
|
-
def hash
|
|
272
|
-
[cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, type].hash
|
|
273
61
|
end
|
|
274
62
|
end
|
|
275
63
|
end
|