datadog_api_client 2.20.0 → 2.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/conftest.py +5 -0
- data/.generator/schemas/v1/openapi.yaml +333 -128
- data/.generator/schemas/v2/openapi.yaml +2450 -131
- data/CHANGELOG.md +28 -0
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
- data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
- data/examples/v2/case-management/ArchiveCase.rb +14 -0
- data/examples/v2/case-management/AssignCase.rb +20 -0
- data/examples/v2/case-management/CreateCase.rb +33 -0
- data/examples/v2/case-management/CreateProject.rb +15 -0
- data/examples/v2/case-management/DeleteProject.rb +5 -0
- data/examples/v2/case-management/GetCase.rb +8 -0
- data/examples/v2/case-management/GetProject.rb +5 -0
- data/examples/v2/case-management/GetProjects.rb +5 -0
- data/examples/v2/case-management/SearchCases.rb +5 -0
- data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
- data/examples/v2/case-management/UnarchiveCase.rb +14 -0
- data/examples/v2/case-management/UnassignCase.rb +14 -0
- data/examples/v2/case-management/UpdatePriority.rb +17 -0
- data/examples/v2/case-management/UpdateStatus.rb +17 -0
- data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
- data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
- data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
- data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
- data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
- data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
- data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
- data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
- data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
- data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +18 -0
- data/examples/v2/metrics/ListMetricAssets.rb +5 -0
- data/lib/datadog_api_client/inflector.rb +112 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
- data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +6 -0
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +8 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +84 -4
- data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
- data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
- data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +69 -1
- data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v2/models/case.rb +150 -0
- data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
- data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
- data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
- data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
- data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
- data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
- data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
- data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
- data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
- data/lib/datadog_api_client/v2/models/case_update_status_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/cases_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
- data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
- data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
- data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
- data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
- data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +21 -20
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
- data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
- data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
- data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
- data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
- data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
- data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
- data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
- data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
- data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
- data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/nullable_user_relationship.rb +88 -0
- data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/project.rb +150 -0
- data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
- data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
- data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
- data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
- data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
- data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +147 -2
@@ -0,0 +1,110 @@
|
|
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
|
+
# Relationships to assets related to the metric.
|
21
|
+
class MetricAssetResponseRelationships
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# An object containing the list of dashboards that can be referenced in the `included` data.
|
25
|
+
attr_accessor :dashboards
|
26
|
+
|
27
|
+
# A object containing the list of monitors that can be referenced in the `included` data.
|
28
|
+
attr_accessor :monitors
|
29
|
+
|
30
|
+
# An object containing the list of notebooks that can be referenced in the `included` data.
|
31
|
+
attr_accessor :notebooks
|
32
|
+
|
33
|
+
# An object containing a list of SLOs that can be referenced in the `included` data.
|
34
|
+
attr_accessor :slos
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
# @!visibility private
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'dashboards' => :'dashboards',
|
41
|
+
:'monitors' => :'monitors',
|
42
|
+
:'notebooks' => :'notebooks',
|
43
|
+
:'slos' => :'slos'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
# @!visibility private
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'dashboards' => :'MetricAssetDashboardRelationships',
|
52
|
+
:'monitors' => :'MetricAssetMonitorRelationships',
|
53
|
+
:'notebooks' => :'MetricAssetNotebookRelationships',
|
54
|
+
:'slos' => :'MetricAssetSLORelationships'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
60
|
+
# @!visibility private
|
61
|
+
def initialize(attributes = {})
|
62
|
+
if (!attributes.is_a?(Hash))
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetResponseRelationships` initialize method"
|
64
|
+
end
|
65
|
+
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetResponseRelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
|
+
end
|
71
|
+
h[k.to_sym] = v
|
72
|
+
}
|
73
|
+
|
74
|
+
if attributes.key?(:'dashboards')
|
75
|
+
self.dashboards = attributes[:'dashboards']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'monitors')
|
79
|
+
self.monitors = attributes[:'monitors']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'notebooks')
|
83
|
+
self.notebooks = attributes[:'notebooks']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'slos')
|
87
|
+
self.slos = attributes[:'slos']
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Checks equality by comparing each attribute.
|
92
|
+
# @param o [Object] Object to be compared
|
93
|
+
# @!visibility private
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
dashboards == o.dashboards &&
|
98
|
+
monitors == o.monitors &&
|
99
|
+
notebooks == o.notebooks &&
|
100
|
+
slos == o.slos
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
# @!visibility private
|
106
|
+
def hash
|
107
|
+
[dashboards, monitors, notebooks, slos].hash
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# An object of type `slos` that can be referenced in the `included` data.
|
21
|
+
class MetricAssetSLORelationship
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The SLO ID.
|
25
|
+
attr_accessor :id
|
26
|
+
|
27
|
+
# SLO resource type.
|
28
|
+
attr_accessor :type
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
# @!visibility private
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'id' => :'id',
|
35
|
+
:'type' => :'type'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'id' => :'String',
|
44
|
+
:'type' => :'MetricSLOType'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
50
|
+
# @!visibility private
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetSLORelationship` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetSLORelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'id')
|
65
|
+
self.id = attributes[:'id']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'type')
|
69
|
+
self.type = attributes[:'type']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Checks equality by comparing each attribute.
|
74
|
+
# @param o [Object] Object to be compared
|
75
|
+
# @!visibility private
|
76
|
+
def ==(o)
|
77
|
+
return true if self.equal?(o)
|
78
|
+
self.class == o.class &&
|
79
|
+
id == o.id &&
|
80
|
+
type == o.type
|
81
|
+
end
|
82
|
+
|
83
|
+
# Calculates hash code according to all attributes.
|
84
|
+
# @return [Integer] Hash code
|
85
|
+
# @!visibility private
|
86
|
+
def hash
|
87
|
+
[id, type].hash
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,82 @@
|
|
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
|
+
# An object containing a list of SLOs that can be referenced in the `included` data.
|
21
|
+
class MetricAssetSLORelationships
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# A list of SLOs that can be referenced in the `included` data.
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'data' => :'data'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'data' => :'Array<MetricAssetSLORelationship>'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
45
|
+
# @!visibility private
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetSLORelationships` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetSLORelationships`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'data')
|
60
|
+
if (value = attributes[:'data']).is_a?(Array)
|
61
|
+
self.data = value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Checks equality by comparing each attribute.
|
67
|
+
# @param o [Object] Object to be compared
|
68
|
+
# @!visibility private
|
69
|
+
def ==(o)
|
70
|
+
return true if self.equal?(o)
|
71
|
+
self.class == o.class &&
|
72
|
+
data == o.data
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Integer] Hash code
|
77
|
+
# @!visibility private
|
78
|
+
def hash
|
79
|
+
[data].hash
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Response object that includes related dashboards, monitors, notebooks, and SLOs.
|
21
|
+
class MetricAssetsResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Metric assets response data.
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
# Array of objects related to the metric assets.
|
28
|
+
attr_accessor :included
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
# @!visibility private
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'data' => :'data',
|
35
|
+
:'included' => :'included'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'data' => :'MetricAssetResponseData',
|
44
|
+
:'included' => :'Array<MetricAssetResponseIncluded>'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
50
|
+
# @!visibility private
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricAssetsResponse` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricAssetsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'data')
|
65
|
+
self.data = attributes[:'data']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'included')
|
69
|
+
if (value = attributes[:'included']).is_a?(Array)
|
70
|
+
self.included = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Checks equality by comparing each attribute.
|
76
|
+
# @param o [Object] Object to be compared
|
77
|
+
# @!visibility private
|
78
|
+
def ==(o)
|
79
|
+
return true if self.equal?(o)
|
80
|
+
self.class == o.class &&
|
81
|
+
data == o.data &&
|
82
|
+
included == o.included
|
83
|
+
end
|
84
|
+
|
85
|
+
# Calculates hash code according to all attributes.
|
86
|
+
# @return [Integer] Hash code
|
87
|
+
# @!visibility private
|
88
|
+
def hash
|
89
|
+
[data, included].hash
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# A dashboard object with title and popularity.
|
21
|
+
class MetricDashboardAsset
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Attributes related to the dashboard, including title and popularity.
|
25
|
+
attr_accessor :attributes
|
26
|
+
|
27
|
+
# The related dashboard's ID.
|
28
|
+
attr_reader :id
|
29
|
+
|
30
|
+
# Dashboard resource type.
|
31
|
+
attr_reader :type
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
# @!visibility private
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'attributes' => :'attributes',
|
38
|
+
:'id' => :'id',
|
39
|
+
:'type' => :'type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'attributes' => :'MetricDashboardAttributes',
|
48
|
+
:'id' => :'String',
|
49
|
+
:'type' => :'MetricDashboardType'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
55
|
+
# @!visibility private
|
56
|
+
def initialize(attributes = {})
|
57
|
+
if (!attributes.is_a?(Hash))
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricDashboardAsset` initialize method"
|
59
|
+
end
|
60
|
+
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricDashboardAsset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
|
+
end
|
66
|
+
h[k.to_sym] = v
|
67
|
+
}
|
68
|
+
|
69
|
+
if attributes.key?(:'attributes')
|
70
|
+
self.attributes = attributes[:'attributes']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'id')
|
74
|
+
self.id = attributes[:'id']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'type')
|
78
|
+
self.type = attributes[:'type']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
# @!visibility private
|
85
|
+
def valid?
|
86
|
+
return false if @id.nil?
|
87
|
+
return false if @type.nil?
|
88
|
+
true
|
89
|
+
end
|
90
|
+
|
91
|
+
# Custom attribute writer method with validation
|
92
|
+
# @param id [Object] Object to be assigned
|
93
|
+
# @!visibility private
|
94
|
+
def id=(id)
|
95
|
+
if id.nil?
|
96
|
+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
|
97
|
+
end
|
98
|
+
@id = id
|
99
|
+
end
|
100
|
+
|
101
|
+
# Custom attribute writer method with validation
|
102
|
+
# @param type [Object] Object to be assigned
|
103
|
+
# @!visibility private
|
104
|
+
def type=(type)
|
105
|
+
if type.nil?
|
106
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
107
|
+
end
|
108
|
+
@type = type
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param o [Object] Object to be compared
|
113
|
+
# @!visibility private
|
114
|
+
def ==(o)
|
115
|
+
return true if self.equal?(o)
|
116
|
+
self.class == o.class &&
|
117
|
+
attributes == o.attributes &&
|
118
|
+
id == o.id &&
|
119
|
+
type == o.type
|
120
|
+
end
|
121
|
+
|
122
|
+
# Calculates hash code according to all attributes.
|
123
|
+
# @return [Integer] Hash code
|
124
|
+
# @!visibility private
|
125
|
+
def hash
|
126
|
+
[attributes, id, type].hash
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -0,0 +1,112 @@
|
|
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 related to the dashboard, including title and popularity.
|
21
|
+
class MetricDashboardAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Value from 0 to 5 that ranks popularity of the dashboard.
|
25
|
+
attr_reader :popularity
|
26
|
+
|
27
|
+
# Title of the asset.
|
28
|
+
attr_accessor :title
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
# @!visibility private
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'popularity' => :'popularity',
|
35
|
+
:'title' => :'title'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'popularity' => :'Float',
|
44
|
+
:'title' => :'String'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
50
|
+
# @!visibility private
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricDashboardAttributes` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MetricDashboardAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'popularity')
|
65
|
+
self.popularity = attributes[:'popularity']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'title')
|
69
|
+
self.title = attributes[:'title']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
# @!visibility private
|
76
|
+
def valid?
|
77
|
+
return false if !@popularity.nil? && @popularity > 5
|
78
|
+
return false if !@popularity.nil? && @popularity < 0
|
79
|
+
true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Custom attribute writer method with validation
|
83
|
+
# @param popularity [Object] Object to be assigned
|
84
|
+
# @!visibility private
|
85
|
+
def popularity=(popularity)
|
86
|
+
if !popularity.nil? && popularity > 5
|
87
|
+
fail ArgumentError, 'invalid value for "popularity", must be smaller than or equal to 5.'
|
88
|
+
end
|
89
|
+
if !popularity.nil? && popularity < 0
|
90
|
+
fail ArgumentError, 'invalid value for "popularity", must be greater than or equal to 0.'
|
91
|
+
end
|
92
|
+
@popularity = popularity
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param o [Object] Object to be compared
|
97
|
+
# @!visibility private
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
popularity == o.popularity &&
|
102
|
+
title == o.title
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
# @!visibility private
|
108
|
+
def hash
|
109
|
+
[popularity, title].hash
|
110
|
+
end
|
111
|
+
end
|
112
|
+
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
|
+
# Dashboard resource type.
|
21
|
+
class MetricDashboardType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
DASHBOARDS = "dashboards".freeze
|
25
|
+
end
|
26
|
+
end
|