datadog_api_client 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/poetry.lock +21 -14
  4. data/.generator/pyproject.toml +1 -1
  5. data/.generator/schemas/v1/openapi.yaml +558 -8
  6. data/.generator/schemas/v2/openapi.yaml +973 -253
  7. data/.generator/src/generator/templates/api_client.j2 +5 -1
  8. data/.generator/src/generator/templates/configuration.j2 +17 -0
  9. data/.github/workflows/test.yml +3 -0
  10. data/.pre-commit-config.yaml +1 -1
  11. data/CHANGELOG.md +26 -0
  12. data/README.md +11 -0
  13. data/examples/v1/dashboards/CreateDashboard_1423904722.rb +38 -0
  14. data/examples/v1/dashboards/CreateDashboard_2652180930.rb +43 -0
  15. data/examples/v1/dashboards/CreateDashboard_2850365602.rb +55 -0
  16. data/examples/v1/dashboards/CreateDashboard_3117424216.rb +33 -0
  17. data/examples/v1/dashboards/CreateDashboard_3669695268.rb +50 -0
  18. data/examples/v1/dashboards/CreateDashboard_858397694.rb +41 -0
  19. data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +1 -1
  20. data/examples/v2/incidents/ListIncidentAttachments.rb +8 -0
  21. data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +11 -0
  22. data/examples/v2/incidents/UpdateIncidentAttachments.rb +38 -0
  23. data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +26 -0
  24. data/examples/v2/metrics/ListActiveMetricConfigurations.rb +5 -0
  25. data/examples/v2/metrics/ListTagConfigurations.rb +1 -1
  26. data/examples/v2/metrics/ListTagConfigurations_265033704.rb +8 -0
  27. data/examples/v2/metrics/{ListTagConfigurations_103226315.rb → ListTagConfigurations_2739018321.rb} +1 -1
  28. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +3 -2
  29. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +2 -2
  30. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +2 -2
  31. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +50 -0
  32. data/examples/v2/security-monitoring/GetSecurityMonitoringSignal.rb +5 -0
  33. data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +2 -1
  34. data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +1 -4
  35. data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +2 -4
  36. data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +2 -4
  37. data/examples/v2/usage-metering/GetHistoricalCostByOrg.rb +8 -0
  38. data/generate.sh +30 -0
  39. data/lib/datadog_api_client/api_client.rb +5 -1
  40. data/lib/datadog_api_client/configuration.rb +20 -1
  41. data/lib/datadog_api_client/inflector.rb +51 -1
  42. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -1
  43. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
  44. data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -2
  45. data/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +28 -5
  46. data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +14 -4
  47. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  48. data/lib/datadog_api_client/v1/models/list_stream_query.rb +14 -4
  49. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  50. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
  51. data/lib/datadog_api_client/v1/models/search_service_level_objective.rb +111 -0
  52. data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +286 -0
  53. data/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +134 -0
  54. data/lib/datadog_api_client/v1/models/search_slo_query.rb +137 -0
  55. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +8 -8
  56. data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +2 -0
  57. data/lib/datadog_api_client/v1/models/search_slo_threshold.rb +184 -0
  58. data/lib/datadog_api_client/v1/models/search_slo_timeframe.rb +28 -0
  59. data/lib/datadog_api_client/v1/models/slo_creator.rb +131 -0
  60. data/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +185 -0
  61. data/lib/datadog_api_client/v1/models/slo_list_widget_definition_type.rb +26 -0
  62. data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +149 -0
  63. data/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +143 -0
  64. data/lib/datadog_api_client/v1/models/slo_list_widget_request_type.rb +26 -0
  65. data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +174 -0
  66. data/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +121 -0
  67. data/lib/datadog_api_client/v1/models/synthetics_assertion_operator.rb +1 -0
  68. data/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +193 -0
  69. data/lib/datadog_api_client/v1/models/topology_map_widget_definition_type.rb +26 -0
  70. data/lib/datadog_api_client/v1/models/topology_query.rb +144 -0
  71. data/lib/datadog_api_client/v1/models/topology_query_data_source.rb +27 -0
  72. data/lib/datadog_api_client/v1/models/topology_request.rb +121 -0
  73. data/lib/datadog_api_client/v1/models/topology_request_type.rb +26 -0
  74. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
  75. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
  76. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +21 -1
  77. data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
  78. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
  79. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
  80. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
  81. data/lib/datadog_api_client/v1/models/widget_definition.rb +3 -1
  82. data/lib/datadog_api_client/v2/api/incident_services_api.rb +2 -2
  83. data/lib/datadog_api_client/v2/api/incident_teams_api.rb +2 -2
  84. data/lib/datadog_api_client/v2/api/incidents_api.rb +155 -0
  85. data/lib/datadog_api_client/v2/api/metrics_api.rb +76 -8
  86. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +65 -0
  87. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
  88. data/lib/datadog_api_client/v2/models/incident_attachment_attachment_type.rb +27 -0
  89. data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +63 -0
  90. data/lib/datadog_api_client/v2/models/incident_attachment_data.rb +187 -0
  91. data/lib/datadog_api_client/v2/models/incident_attachment_link_attachment_type.rb +26 -0
  92. data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +145 -0
  93. data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +143 -0
  94. data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attachment_type.rb +26 -0
  95. data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +145 -0
  96. data/lib/datadog_api_client/v2/models/incident_attachment_related_object.rb +26 -0
  97. data/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +111 -0
  98. data/lib/datadog_api_client/v2/models/incident_attachment_type.rb +26 -0
  99. data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +63 -0
  100. data/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +144 -0
  101. data/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +127 -0
  102. data/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +137 -0
  103. data/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +143 -0
  104. data/lib/datadog_api_client/v2/models/incident_attachments_response.rb +136 -0
  105. data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +62 -0
  106. data/lib/datadog_api_client/v2/models/incident_related_object.rb +1 -0
  107. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -11
  108. data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +2 -1
  109. data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +14 -14
  110. data/lib/datadog_api_client/v2/models/metric_active_configuration_type.rb +26 -0
  111. data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +133 -0
  112. data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +111 -0
  113. data/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +125 -0
  114. data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +124 -0
  115. data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +145 -0
  116. data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +36 -248
  117. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +36 -151
  118. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
  119. data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +37 -253
  120. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +275 -0
  121. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +187 -0
  122. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +279 -0
  123. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_type.rb +26 -0
  124. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +275 -0
  125. data/lib/datadog_api_client/v2/models/{security_monitoring_rule_query_create.rb → security_monitoring_standard_rule_query.rb} +3 -3
  126. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +279 -0
  127. data/lib/datadog_api_client/version.rb +1 -1
  128. metadata +70 -6
  129. data/Makefile +0 -7
  130. data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
@@ -31,6 +31,12 @@ module DatadogAPIClient::V1
31
31
  # The synthetic API test usage by tag(s).
32
32
  attr_accessor :api_usage
33
33
 
34
+ # The percentage of APM ECS Fargate task usage by tag(s).
35
+ attr_accessor :apm_fargate_percentage
36
+
37
+ # The APM ECS Fargate task usage by tag(s).
38
+ attr_accessor :apm_fargate_usage
39
+
34
40
  # The percentage of APM host usage by tag(s).
35
41
  attr_accessor :apm_host_percentage
36
42
 
@@ -145,6 +151,8 @@ module DatadogAPIClient::V1
145
151
  {
146
152
  :'api_percentage' => :'api_percentage',
147
153
  :'api_usage' => :'api_usage',
154
+ :'apm_fargate_percentage' => :'apm_fargate_percentage',
155
+ :'apm_fargate_usage' => :'apm_fargate_usage',
148
156
  :'apm_host_percentage' => :'apm_host_percentage',
149
157
  :'apm_host_usage' => :'apm_host_usage',
150
158
  :'appsec_percentage' => :'appsec_percentage',
@@ -196,6 +204,8 @@ module DatadogAPIClient::V1
196
204
  {
197
205
  :'api_percentage' => :'Float',
198
206
  :'api_usage' => :'Float',
207
+ :'apm_fargate_percentage' => :'Float',
208
+ :'apm_fargate_usage' => :'Float',
199
209
  :'apm_host_percentage' => :'Float',
200
210
  :'apm_host_usage' => :'Float',
201
211
  :'appsec_percentage' => :'Float',
@@ -266,6 +276,14 @@ module DatadogAPIClient::V1
266
276
  self.api_usage = attributes[:'api_usage']
267
277
  end
268
278
 
279
+ if attributes.key?(:'apm_fargate_percentage')
280
+ self.apm_fargate_percentage = attributes[:'apm_fargate_percentage']
281
+ end
282
+
283
+ if attributes.key?(:'apm_fargate_usage')
284
+ self.apm_fargate_usage = attributes[:'apm_fargate_usage']
285
+ end
286
+
269
287
  if attributes.key?(:'apm_host_percentage')
270
288
  self.apm_host_percentage = attributes[:'apm_host_percentage']
271
289
  end
@@ -426,6 +444,8 @@ module DatadogAPIClient::V1
426
444
  self.class == o.class &&
427
445
  api_percentage == o.api_percentage &&
428
446
  api_usage == o.api_usage &&
447
+ apm_fargate_percentage == o.apm_fargate_percentage &&
448
+ apm_fargate_usage == o.apm_fargate_usage &&
429
449
  apm_host_percentage == o.apm_host_percentage &&
430
450
  apm_host_usage == o.apm_host_usage &&
431
451
  appsec_percentage == o.appsec_percentage &&
@@ -475,7 +495,7 @@ module DatadogAPIClient::V1
475
495
  # @return [Integer] Hash code
476
496
  # @!visibility private
477
497
  def hash
478
- [api_percentage, api_usage, apm_host_percentage, apm_host_usage, appsec_percentage, appsec_usage, browser_percentage, browser_usage, container_percentage, container_usage, custom_timeseries_percentage, custom_timeseries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, estimated_ingested_logs_percentage, estimated_ingested_logs_usage, estimated_ingested_spans_percentage, estimated_ingested_spans_usage, fargate_percentage, fargate_usage, functions_percentage, functions_usage, indexed_logs_percentage, indexed_logs_usage, infra_host_percentage, infra_host_usage, invocations_percentage, invocations_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_host_percentage, profiled_host_usage, snmp_percentage, snmp_usage].hash
498
+ [api_percentage, api_usage, apm_fargate_percentage, apm_fargate_usage, apm_host_percentage, apm_host_usage, appsec_percentage, appsec_usage, browser_percentage, browser_usage, container_percentage, container_usage, custom_timeseries_percentage, custom_timeseries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, estimated_ingested_logs_percentage, estimated_ingested_logs_usage, estimated_ingested_spans_percentage, estimated_ingested_spans_usage, fargate_percentage, fargate_usage, functions_percentage, functions_usage, indexed_logs_percentage, indexed_logs_usage, infra_host_percentage, infra_host_usage, invocations_percentage, invocations_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_host_percentage, profiled_host_usage, snmp_percentage, snmp_usage].hash
479
499
  end
480
500
  end
481
501
  end
@@ -0,0 +1,111 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # A service level objective data container.
21
+ class SearchServiceLevelObjective
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # A service level objective ID and attributes.
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' => :'SearchServiceLevelObjectiveData'
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::V1::SearchServiceLevelObjective` 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::V1::SearchServiceLevelObjective`. 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
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ data == o.data
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param o [Object] Object to be compared
99
+ # @!visibility private
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ # @!visibility private
107
+ def hash
108
+ [data].hash
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,286 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # A service level objective object includes a service level indicator, thresholds
21
+ # for one or more timeframes, and metadata (`name`, `description`, and `tags`).
22
+ class SearchServiceLevelObjectiveAttributes
23
+ include BaseGenericModel
24
+
25
+ # Whether the object has unparsed attributes
26
+ # @!visibility private
27
+ attr_accessor :_unparsed
28
+
29
+ # A list of tags associated with this service level objective.
30
+ # Always included in service level objective responses (but may be empty).
31
+ attr_accessor :all_tags
32
+
33
+ # Creation timestamp (UNIX time in seconds)
34
+ #
35
+ # Always included in service level objective responses.
36
+ attr_accessor :created_at
37
+
38
+ # The creator of the SLO
39
+ attr_accessor :creator
40
+
41
+ # A user-defined description of the service level objective.
42
+ #
43
+ # Always included in service level objective responses (but may be `null`).
44
+ # Optional in create/update requests.
45
+ attr_accessor :description
46
+
47
+ # Tags with the `env` tag key.
48
+ attr_accessor :env_tags
49
+
50
+ # A list of (up to 100) monitor groups that narrow the scope of a monitor service level objective.
51
+ # Included in service level objective responses if it is not empty.
52
+ attr_accessor :groups
53
+
54
+ # Modification timestamp (UNIX time in seconds)
55
+ #
56
+ # Always included in service level objective responses.
57
+ attr_accessor :modified_at
58
+
59
+ # A list of monitor ids that defines the scope of a monitor service level
60
+ # objective.
61
+ attr_accessor :monitor_ids
62
+
63
+ # The name of the service level objective object.
64
+ attr_accessor :name
65
+
66
+ # calculated status and error budget remaining.
67
+ attr_accessor :overall_status
68
+
69
+ # A metric-based SLO. **Required if type is `metric`**. Note that Datadog only allows the sum by aggregator
70
+ # to be used because this will sum up all request counts instead of averaging them, or taking the max or
71
+ # min of all of those requests.
72
+ attr_accessor :query
73
+
74
+ # Tags with the `service` tag key.
75
+ attr_accessor :service_tags
76
+
77
+ # The type of the service level objective.
78
+ attr_accessor :slo_type
79
+
80
+ # Tags with the `team` tag key.
81
+ attr_accessor :team_tags
82
+
83
+ # The thresholds (timeframes and associated targets) for this service level
84
+ # objective object.
85
+ attr_accessor :thresholds
86
+
87
+ # Attribute mapping from ruby-style variable name to JSON key.
88
+ # @!visibility private
89
+ def self.attribute_map
90
+ {
91
+ :'all_tags' => :'all_tags',
92
+ :'created_at' => :'created_at',
93
+ :'creator' => :'creator',
94
+ :'description' => :'description',
95
+ :'env_tags' => :'env_tags',
96
+ :'groups' => :'groups',
97
+ :'modified_at' => :'modified_at',
98
+ :'monitor_ids' => :'monitor_ids',
99
+ :'name' => :'name',
100
+ :'overall_status' => :'overall_status',
101
+ :'query' => :'query',
102
+ :'service_tags' => :'service_tags',
103
+ :'slo_type' => :'slo_type',
104
+ :'team_tags' => :'team_tags',
105
+ :'thresholds' => :'thresholds'
106
+ }
107
+ end
108
+
109
+ # Returns all the JSON keys this model knows about
110
+ # @!visibility private
111
+ def self.acceptable_attributes
112
+ attribute_map.values
113
+ end
114
+
115
+ # Attribute type mapping.
116
+ # @!visibility private
117
+ def self.openapi_types
118
+ {
119
+ :'all_tags' => :'Array<String>',
120
+ :'created_at' => :'Integer',
121
+ :'creator' => :'SLOCreator',
122
+ :'description' => :'String',
123
+ :'env_tags' => :'Array<String>',
124
+ :'groups' => :'Array<String>',
125
+ :'modified_at' => :'Integer',
126
+ :'monitor_ids' => :'Array<Integer>',
127
+ :'name' => :'String',
128
+ :'overall_status' => :'Array<SLOOverallStatuses>',
129
+ :'query' => :'SearchSLOQuery',
130
+ :'service_tags' => :'Array<String>',
131
+ :'slo_type' => :'SLOType',
132
+ :'team_tags' => :'Array<String>',
133
+ :'thresholds' => :'Array<SearchSLOThreshold>'
134
+ }
135
+ end
136
+
137
+ # List of attributes with nullable: true
138
+ # @!visibility private
139
+ def self.openapi_nullable
140
+ Set.new([
141
+ :'creator',
142
+ :'description',
143
+ :'groups',
144
+ :'monitor_ids',
145
+ :'query',
146
+ ])
147
+ end
148
+
149
+ # Initializes the object
150
+ # @param attributes [Hash] Model attributes in the form of hash
151
+ # @!visibility private
152
+ def initialize(attributes = {})
153
+ if (!attributes.is_a?(Hash))
154
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchServiceLevelObjectiveAttributes` initialize method"
155
+ end
156
+
157
+ # check to see if the attribute exists and convert string to symbol for hash key
158
+ attributes = attributes.each_with_object({}) { |(k, v), h|
159
+ if (!self.class.attribute_map.key?(k.to_sym))
160
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchServiceLevelObjectiveAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
161
+ end
162
+ h[k.to_sym] = v
163
+ }
164
+
165
+ if attributes.key?(:'all_tags')
166
+ if (value = attributes[:'all_tags']).is_a?(Array)
167
+ self.all_tags = value
168
+ end
169
+ end
170
+
171
+ if attributes.key?(:'created_at')
172
+ self.created_at = attributes[:'created_at']
173
+ end
174
+
175
+ if attributes.key?(:'creator')
176
+ self.creator = attributes[:'creator']
177
+ end
178
+
179
+ if attributes.key?(:'description')
180
+ self.description = attributes[:'description']
181
+ end
182
+
183
+ if attributes.key?(:'env_tags')
184
+ if (value = attributes[:'env_tags']).is_a?(Array)
185
+ self.env_tags = value
186
+ end
187
+ end
188
+
189
+ if attributes.key?(:'groups')
190
+ if (value = attributes[:'groups']).is_a?(Array)
191
+ self.groups = value
192
+ end
193
+ end
194
+
195
+ if attributes.key?(:'modified_at')
196
+ self.modified_at = attributes[:'modified_at']
197
+ end
198
+
199
+ if attributes.key?(:'monitor_ids')
200
+ if (value = attributes[:'monitor_ids']).is_a?(Array)
201
+ self.monitor_ids = value
202
+ end
203
+ end
204
+
205
+ if attributes.key?(:'name')
206
+ self.name = attributes[:'name']
207
+ end
208
+
209
+ if attributes.key?(:'overall_status')
210
+ if (value = attributes[:'overall_status']).is_a?(Array)
211
+ self.overall_status = value
212
+ end
213
+ end
214
+
215
+ if attributes.key?(:'query')
216
+ self.query = attributes[:'query']
217
+ end
218
+
219
+ if attributes.key?(:'service_tags')
220
+ if (value = attributes[:'service_tags']).is_a?(Array)
221
+ self.service_tags = value
222
+ end
223
+ end
224
+
225
+ if attributes.key?(:'slo_type')
226
+ self.slo_type = attributes[:'slo_type']
227
+ end
228
+
229
+ if attributes.key?(:'team_tags')
230
+ if (value = attributes[:'team_tags']).is_a?(Array)
231
+ self.team_tags = value
232
+ end
233
+ end
234
+
235
+ if attributes.key?(:'thresholds')
236
+ if (value = attributes[:'thresholds']).is_a?(Array)
237
+ self.thresholds = value
238
+ end
239
+ end
240
+ end
241
+
242
+ # Check to see if the all the properties in the model are valid
243
+ # @return true if the model is valid
244
+ # @!visibility private
245
+ def valid?
246
+ true
247
+ end
248
+
249
+ # Checks equality by comparing each attribute.
250
+ # @param o [Object] Object to be compared
251
+ # @!visibility private
252
+ def ==(o)
253
+ return true if self.equal?(o)
254
+ self.class == o.class &&
255
+ all_tags == o.all_tags &&
256
+ created_at == o.created_at &&
257
+ creator == o.creator &&
258
+ description == o.description &&
259
+ env_tags == o.env_tags &&
260
+ groups == o.groups &&
261
+ modified_at == o.modified_at &&
262
+ monitor_ids == o.monitor_ids &&
263
+ name == o.name &&
264
+ overall_status == o.overall_status &&
265
+ query == o.query &&
266
+ service_tags == o.service_tags &&
267
+ slo_type == o.slo_type &&
268
+ team_tags == o.team_tags &&
269
+ thresholds == o.thresholds
270
+ end
271
+
272
+ # @see the `==` method
273
+ # @param o [Object] Object to be compared
274
+ # @!visibility private
275
+ def eql?(o)
276
+ self == o
277
+ end
278
+
279
+ # Calculates hash code according to all attributes.
280
+ # @return [Integer] Hash code
281
+ # @!visibility private
282
+ def hash
283
+ [all_tags, created_at, creator, description, env_tags, groups, modified_at, monitor_ids, name, overall_status, query, service_tags, slo_type, team_tags, thresholds].hash
284
+ end
285
+ end
286
+ end
@@ -0,0 +1,134 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # A service level objective ID and attributes.
21
+ class SearchServiceLevelObjectiveData
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # A service level objective object includes a service level indicator, thresholds
29
+ # for one or more timeframes, and metadata (`name`, `description`, and `tags`).
30
+ attr_accessor :attributes
31
+
32
+ # A unique identifier for the service level objective object.
33
+ #
34
+ # Always included in service level objective responses.
35
+ attr_accessor :id
36
+
37
+ # The type of the object, must be `slo`.
38
+ attr_accessor :type
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'attributes' => :'attributes',
45
+ :'id' => :'id',
46
+ :'type' => :'type'
47
+ }
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ # @!visibility private
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ # @!visibility private
58
+ def self.openapi_types
59
+ {
60
+ :'attributes' => :'SearchServiceLevelObjectiveAttributes',
61
+ :'id' => :'String',
62
+ :'type' => :'String'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ # @!visibility private
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param attributes [Hash] Model attributes in the form of hash
75
+ # @!visibility private
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SearchServiceLevelObjectiveData` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ attributes = attributes.each_with_object({}) { |(k, v), h|
83
+ if (!self.class.attribute_map.key?(k.to_sym))
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SearchServiceLevelObjectiveData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
85
+ end
86
+ h[k.to_sym] = v
87
+ }
88
+
89
+ if attributes.key?(:'attributes')
90
+ self.attributes = attributes[:'attributes']
91
+ end
92
+
93
+ if attributes.key?(:'id')
94
+ self.id = attributes[:'id']
95
+ end
96
+
97
+ if attributes.key?(:'type')
98
+ self.type = attributes[:'type']
99
+ end
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ # @!visibility private
105
+ def valid?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param o [Object] Object to be compared
111
+ # @!visibility private
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ attributes == o.attributes &&
116
+ id == o.id &&
117
+ type == o.type
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param o [Object] Object to be compared
122
+ # @!visibility private
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ # @!visibility private
130
+ def hash
131
+ [attributes, id, type].hash
132
+ end
133
+ end
134
+ end