Skip to content

Commit 2ead1d0

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fcdfc0b9 of spec repo
1 parent 19259ec commit 2ead1d0

File tree

7 files changed

+109
-34
lines changed

7 files changed

+109
-34
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-10-28 23:07:48.631310",
8-
"spec_repo_commit": "4251a422"
7+
"regenerated": "2024-10-30 10:12:22.881730",
8+
"spec_repo_commit": "fcdfc0b9"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-28 23:07:48.650835",
13-
"spec_repo_commit": "4251a422"
12+
"regenerated": "2024-10-30 10:12:22.901200",
13+
"spec_repo_commit": "fcdfc0b9"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15530,7 +15530,7 @@ components:
1553015530
$ref: '#/components/schemas/SyntheticsMobileStepParamsDirection'
1553115531
element:
1553215532
$ref: '#/components/schemas/SyntheticsMobileStepParamsElement'
15533-
enable:
15533+
enabled:
1553415534
description: Boolean to change the state of the wifi for a `toggleWiFi`
1553515535
step type.
1553615536
type: boolean
@@ -15546,8 +15546,7 @@ components:
1554615546
step type.
1554715547
type: string
1554815548
value:
15549-
description: Values used in the step. Used in multiple step types.
15550-
type: string
15549+
$ref: '#/components/schemas/SyntheticsMobileStepParamsValue'
1555115550
variable:
1555215551
$ref: '#/components/schemas/SyntheticsMobileStepParamsVariable'
1555315552
withEnter:
@@ -15556,12 +15555,12 @@ components:
1555615555
type: boolean
1555715556
x:
1555815557
description: Amount to scroll by on the `x` axis for a `scroll` step type.
15559-
format: int64
15560-
type: integer
15558+
format: double
15559+
type: number
1556115560
y:
1556215561
description: Amount to scroll by on the `y` axis for a `scroll` step type.
15563-
format: int64
15564-
type: integer
15562+
format: double
15563+
type: number
1556515564
type: object
1556615565
SyntheticsMobileStepParamsDirection:
1556715566
description: The direction of the scroll for a `scrollToElement` step type.
@@ -15615,12 +15614,12 @@ components:
1561515614
properties:
1561615615
x:
1561715616
description: The `relativePosition` on the `x` axis for the element.
15618-
format: int64
15619-
type: integer
15617+
format: double
15618+
type: number
1562015619
y:
1562115620
description: The `relativePosition` on the `y` axis for the element.
15622-
format: int64
15623-
type: integer
15621+
format: double
15622+
type: number
1562415623
type: object
1562515624
SyntheticsMobileStepParamsElementUserLocator:
1562615625
description: User locator to find the element.
@@ -15670,13 +15669,25 @@ components:
1567015669
properties:
1567115670
x:
1567215671
description: The `x` position for the flick.
15673-
format: int64
15674-
type: integer
15672+
format: double
15673+
type: number
1567515674
y:
1567615675
description: The `y` position for the flick.
15677-
format: int64
15678-
type: integer
15676+
format: double
15677+
type: number
1567915678
type: object
15679+
SyntheticsMobileStepParamsValue:
15680+
description: Values used in the step for in multiple step types.
15681+
oneOf:
15682+
- $ref: '#/components/schemas/SyntheticsMobileStepParamsValueString'
15683+
- $ref: '#/components/schemas/SyntheticsMobileStepParamsValueNumber'
15684+
SyntheticsMobileStepParamsValueNumber:
15685+
description: Value used in the step for in multiple step types.
15686+
format: int64
15687+
type: integer
15688+
SyntheticsMobileStepParamsValueString:
15689+
description: Value used in the step for in multiple step types.
15690+
type: string
1568015691
SyntheticsMobileStepParamsVariable:
1568115692
description: Variable object for `extractVariable` step type.
1568215693
properties:

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ def overrides
646646
"v1.synthetics_mobile_step_params_element_user_locator_values_items" => "SyntheticsMobileStepParamsElementUserLocatorValuesItems",
647647
"v1.synthetics_mobile_step_params_element_user_locator_values_items_type" => "SyntheticsMobileStepParamsElementUserLocatorValuesItemsType",
648648
"v1.synthetics_mobile_step_params_positions_items" => "SyntheticsMobileStepParamsPositionsItems",
649+
"v1.synthetics_mobile_step_params_value" => "SyntheticsMobileStepParamsValue",
649650
"v1.synthetics_mobile_step_params_variable" => "SyntheticsMobileStepParamsVariable",
650651
"v1.synthetics_mobile_step_type" => "SyntheticsMobileStepType",
651652
"v1.synthetics_mobile_test" => "SyntheticsMobileTest",

lib/datadog_api_client/v1/models/synthetics_mobile_step_params.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class SyntheticsMobileStepParams
3434
attr_accessor :element
3535

3636
# Boolean to change the state of the wifi for a `toggleWiFi` step type.
37-
attr_accessor :enable
37+
attr_accessor :enabled
3838

3939
# Maximum number of scrolls to do for a `scrollToElement` step type.
4040
attr_accessor :max_scrolls
@@ -45,7 +45,7 @@ class SyntheticsMobileStepParams
4545
# Public ID of the test to be played as part of a `playSubTest` step type.
4646
attr_accessor :subtest_public_id
4747

48-
# Values used in the step. Used in multiple step types.
48+
# Values used in the step for in multiple step types.
4949
attr_accessor :value
5050

5151
# Variable object for `extractVariable` step type.
@@ -70,7 +70,7 @@ def self.attribute_map
7070
:'delay' => :'delay',
7171
:'direction' => :'direction',
7272
:'element' => :'element',
73-
:'enable' => :'enable',
73+
:'enabled' => :'enabled',
7474
:'max_scrolls' => :'maxScrolls',
7575
:'positions' => :'positions',
7676
:'subtest_public_id' => :'subtestPublicId',
@@ -90,15 +90,15 @@ def self.openapi_types
9090
:'delay' => :'Integer',
9191
:'direction' => :'SyntheticsMobileStepParamsDirection',
9292
:'element' => :'SyntheticsMobileStepParamsElement',
93-
:'enable' => :'Boolean',
93+
:'enabled' => :'Boolean',
9494
:'max_scrolls' => :'Integer',
9595
:'positions' => :'Array<SyntheticsMobileStepParamsPositionsItems>',
9696
:'subtest_public_id' => :'String',
97-
:'value' => :'String',
97+
:'value' => :'SyntheticsMobileStepParamsValue',
9898
:'variable' => :'SyntheticsMobileStepParamsVariable',
9999
:'with_enter' => :'Boolean',
100-
:'x' => :'Integer',
101-
:'y' => :'Integer'
100+
:'x' => :'Float',
101+
:'y' => :'Float'
102102
}
103103
end
104104

@@ -136,8 +136,8 @@ def initialize(attributes = {})
136136
self.element = attributes[:'element']
137137
end
138138

139-
if attributes.key?(:'enable')
140-
self.enable = attributes[:'enable']
139+
if attributes.key?(:'enabled')
140+
self.enabled = attributes[:'enabled']
141141
end
142142

143143
if attributes.key?(:'max_scrolls')
@@ -227,7 +227,7 @@ def ==(o)
227227
delay == o.delay &&
228228
direction == o.direction &&
229229
element == o.element &&
230-
enable == o.enable &&
230+
enabled == o.enabled &&
231231
max_scrolls == o.max_scrolls &&
232232
positions == o.positions &&
233233
subtest_public_id == o.subtest_public_id &&
@@ -243,7 +243,7 @@ def ==(o)
243243
# @return [Integer] Hash code
244244
# @!visibility private
245245
def hash
246-
[check, delay, direction, element, enable, max_scrolls, positions, subtest_public_id, value, variable, with_enter, x, y].hash
246+
[check, delay, direction, element, enabled, max_scrolls, positions, subtest_public_id, value, variable, with_enter, x, y].hash
247247
end
248248
end
249249
end

lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_relative_position.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def self.attribute_map
4242
# @!visibility private
4343
def self.openapi_types
4444
{
45-
:'x' => :'Integer',
46-
:'y' => :'Integer'
45+
:'x' => :'Float',
46+
:'y' => :'Float'
4747
}
4848
end
4949

lib/datadog_api_client/v1/models/synthetics_mobile_step_params_positions_items.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def self.attribute_map
4242
# @!visibility private
4343
def self.openapi_types
4444
{
45-
:'x' => :'Integer',
46-
:'y' => :'Integer'
45+
:'x' => :'Float',
46+
:'y' => :'Float'
4747
}
4848
end
4949

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
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+
# Values used in the step for in multiple step types.
21+
module SyntheticsMobileStepParamsValue
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+
:'String',
30+
:'Integer'
31+
]
32+
end
33+
# Builds the object
34+
# @param data [Mixed] Data to be matched against the list of oneOf items
35+
# @return [Object] Returns the model or the data itself
36+
def build(data)
37+
# Go through the list of oneOf items and attempt to identify the appropriate one.
38+
# Note:
39+
# - We do not attempt to check whether exactly one item matches.
40+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
42+
# - TODO: scalar values are de facto behaving as if they were nullable.
43+
# - TODO: logging when debugging is set.
44+
openapi_one_of.each do |klass|
45+
begin
46+
next if klass == :AnyType # "nullable: true"
47+
typed_data = find_and_cast_into_type(klass, data)
48+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
49+
return typed_data if typed_data
50+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
51+
end
52+
end
53+
54+
if openapi_one_of.include?(:AnyType)
55+
data
56+
else
57+
self._unparsed = true
58+
DatadogAPIClient::UnparsedObject.new(data)
59+
end
60+
end
61+
end
62+
end
63+
end

0 commit comments

Comments
 (0)