Skip to content

Commit 6d72be1

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 872cf6d of spec repo
1 parent 86bec74 commit 6d72be1

File tree

5 files changed

+127
-2
lines changed

5 files changed

+127
-2
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "d02c8a3",
3-
"generated": "2025-08-08 12:07:05.112"
2+
"spec_repo_commit": "872cf6d",
3+
"generated": "2025-08-12 14:33:25.293"
44
}

.generator/schemas/v1/openapi.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5123,6 +5123,12 @@ components:
51235123
error:
51245124
$ref: '#/components/schemas/LogsAPIError'
51255125
type: object
5126+
LogsAPILimitReachedResponse:
5127+
description: Response returned by the Logs API when the max limit has been reached.
5128+
properties:
5129+
error:
5130+
$ref: '#/components/schemas/LogsAPIError'
5131+
type: object
51265132
LogsArithmeticProcessor:
51275133
description: "Use the Arithmetic Processor to add a new attribute (without spaces
51285134
or special characters\nin the new attribute name) to a log with the result
@@ -29444,6 +29450,12 @@ paths:
2944429450
schema:
2944529451
$ref: '#/components/schemas/APIErrorResponse'
2944629452
description: Forbidden
29453+
'422':
29454+
content:
29455+
application/json:
29456+
schema:
29457+
$ref: '#/components/schemas/LogsAPILimitReachedResponse'
29458+
description: Unprocessable Entity
2944729459
'429':
2944829460
$ref: '#/components/responses/TooManyRequestsResponse'
2944929461
summary: Create an index

features/v1/logs_indexes.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ Feature: Logs Indexes
2222
When the request is sent
2323
Then the response status is 200 OK
2424

25+
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
26+
Scenario: Create an index returns "Unprocessable Entity" response
27+
Given new "CreateLogsIndex" request
28+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15}
29+
When the request is sent
30+
Then the response status is 422 Unprocessable Entity
31+
2532
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
2633
Scenario: Delete an index returns "Not Found" response
2734
Given new "DeleteLogsIndex" request

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def overrides
225225
"v1.log_query_definition_search" => "LogQueryDefinitionSearch",
226226
"v1.logs_api_error" => "LogsAPIError",
227227
"v1.logs_api_error_response" => "LogsAPIErrorResponse",
228+
"v1.logs_api_limit_reached_response" => "LogsAPILimitReachedResponse",
228229
"v1.logs_arithmetic_processor" => "LogsArithmeticProcessor",
229230
"v1.logs_arithmetic_processor_type" => "LogsArithmeticProcessorType",
230231
"v1.logs_array_processor" => "LogsArrayProcessor",
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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+
# Response returned by the Logs API when the max limit has been reached.
21+
class LogsAPILimitReachedResponse
22+
include BaseGenericModel
23+
24+
# Error returned by the Logs API
25+
attr_accessor :error
26+
27+
attr_accessor :additional_properties
28+
29+
# Attribute mapping from ruby-style variable name to JSON key.
30+
# @!visibility private
31+
def self.attribute_map
32+
{
33+
:'error' => :'error'
34+
}
35+
end
36+
37+
# Attribute type mapping.
38+
# @!visibility private
39+
def self.openapi_types
40+
{
41+
:'error' => :'LogsAPIError'
42+
}
43+
end
44+
45+
# Initializes the object
46+
# @param attributes [Hash] Model attributes in the form of hash
47+
# @!visibility private
48+
def initialize(attributes = {})
49+
if (!attributes.is_a?(Hash))
50+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsAPILimitReachedResponse` initialize method"
51+
end
52+
53+
self.additional_properties = {}
54+
# check to see if the attribute exists and convert string to symbol for hash key
55+
attributes = attributes.each_with_object({}) { |(k, v), h|
56+
if (!self.class.attribute_map.key?(k.to_sym))
57+
self.additional_properties[k.to_sym] = v
58+
else
59+
h[k.to_sym] = v
60+
end
61+
}
62+
63+
if attributes.key?(:'error')
64+
self.error = attributes[:'error']
65+
end
66+
end
67+
68+
# Returns the object in the form of hash, with additionalProperties support.
69+
# @return [Hash] Returns the object in the form of hash
70+
# @!visibility private
71+
def to_hash
72+
hash = {}
73+
self.class.attribute_map.each_pair do |attr, param|
74+
value = self.send(attr)
75+
if value.nil?
76+
is_nullable = self.class.openapi_nullable.include?(attr)
77+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78+
end
79+
80+
hash[param] = _to_hash(value)
81+
end
82+
self.additional_properties.each_pair do |attr, value|
83+
hash[attr] = value
84+
end
85+
hash
86+
end
87+
88+
# Checks equality by comparing each attribute.
89+
# @param o [Object] Object to be compared
90+
# @!visibility private
91+
def ==(o)
92+
return true if self.equal?(o)
93+
self.class == o.class &&
94+
error == o.error &&
95+
additional_properties == o.additional_properties
96+
end
97+
98+
# Calculates hash code according to all attributes.
99+
# @return [Integer] Hash code
100+
# @!visibility private
101+
def hash
102+
[error, additional_properties].hash
103+
end
104+
end
105+
end

0 commit comments

Comments
 (0)