Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-31 14:19:55.243697",
"spec_repo_commit": "47da2e01"
"regenerated": "2024-10-31 14:51:29.321354",
"spec_repo_commit": "e9cc5e6a"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-31 14:19:55.263009",
"spec_repo_commit": "47da2e01"
"regenerated": "2024-10-31 14:51:29.340011",
"spec_repo_commit": "e9cc5e6a"
}
}
}
41 changes: 26 additions & 15 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15530,7 +15530,7 @@ components:
$ref: '#/components/schemas/SyntheticsMobileStepParamsDirection'
element:
$ref: '#/components/schemas/SyntheticsMobileStepParamsElement'
enable:
enabled:
description: Boolean to change the state of the wifi for a `toggleWiFi`
step type.
type: boolean
Expand All @@ -15546,8 +15546,7 @@ components:
step type.
type: string
value:
description: Values used in the step. Used in multiple step types.
type: string
$ref: '#/components/schemas/SyntheticsMobileStepParamsValue'
variable:
$ref: '#/components/schemas/SyntheticsMobileStepParamsVariable'
withEnter:
Expand All @@ -15556,12 +15555,12 @@ components:
type: boolean
x:
description: Amount to scroll by on the `x` axis for a `scroll` step type.
format: int64
type: integer
format: double
type: number
y:
description: Amount to scroll by on the `y` axis for a `scroll` step type.
format: int64
type: integer
format: double
type: number
type: object
SyntheticsMobileStepParamsDirection:
description: The direction of the scroll for a `scrollToElement` step type.
Expand Down Expand Up @@ -15615,12 +15614,12 @@ components:
properties:
x:
description: The `relativePosition` on the `x` axis for the element.
format: int64
type: integer
format: double
type: number
y:
description: The `relativePosition` on the `y` axis for the element.
format: int64
type: integer
format: double
type: number
type: object
SyntheticsMobileStepParamsElementUserLocator:
description: User locator to find the element.
Expand Down Expand Up @@ -15670,13 +15669,25 @@ components:
properties:
x:
description: The `x` position for the flick.
format: int64
type: integer
format: double
type: number
y:
description: The `y` position for the flick.
format: int64
type: integer
format: double
type: number
type: object
SyntheticsMobileStepParamsValue:
description: Values used in the step for in multiple step types.
oneOf:
- $ref: '#/components/schemas/SyntheticsMobileStepParamsValueString'
- $ref: '#/components/schemas/SyntheticsMobileStepParamsValueNumber'
SyntheticsMobileStepParamsValueNumber:
description: Value used in the step for in multiple step types.
format: int64
type: integer
SyntheticsMobileStepParamsValueString:
description: Value used in the step for in multiple step types.
type: string
SyntheticsMobileStepParamsVariable:
description: Variable object for `extractVariable` step type.
properties:
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ def overrides
"v1.synthetics_mobile_step_params_element_user_locator_values_items" => "SyntheticsMobileStepParamsElementUserLocatorValuesItems",
"v1.synthetics_mobile_step_params_element_user_locator_values_items_type" => "SyntheticsMobileStepParamsElementUserLocatorValuesItemsType",
"v1.synthetics_mobile_step_params_positions_items" => "SyntheticsMobileStepParamsPositionsItems",
"v1.synthetics_mobile_step_params_value" => "SyntheticsMobileStepParamsValue",
"v1.synthetics_mobile_step_params_variable" => "SyntheticsMobileStepParamsVariable",
"v1.synthetics_mobile_step_type" => "SyntheticsMobileStepType",
"v1.synthetics_mobile_test" => "SyntheticsMobileTest",
Expand Down
22 changes: 11 additions & 11 deletions lib/datadog_api_client/v1/models/synthetics_mobile_step_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SyntheticsMobileStepParams
attr_accessor :element

# Boolean to change the state of the wifi for a `toggleWiFi` step type.
attr_accessor :enable
attr_accessor :enabled

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

# Values used in the step. Used in multiple step types.
# Values used in the step for in multiple step types.
attr_accessor :value

# Variable object for `extractVariable` step type.
Expand All @@ -70,7 +70,7 @@ def self.attribute_map
:'delay' => :'delay',
:'direction' => :'direction',
:'element' => :'element',
:'enable' => :'enable',
:'enabled' => :'enabled',
:'max_scrolls' => :'maxScrolls',
:'positions' => :'positions',
:'subtest_public_id' => :'subtestPublicId',
Expand All @@ -90,15 +90,15 @@ def self.openapi_types
:'delay' => :'Integer',
:'direction' => :'SyntheticsMobileStepParamsDirection',
:'element' => :'SyntheticsMobileStepParamsElement',
:'enable' => :'Boolean',
:'enabled' => :'Boolean',
:'max_scrolls' => :'Integer',
:'positions' => :'Array<SyntheticsMobileStepParamsPositionsItems>',
:'subtest_public_id' => :'String',
:'value' => :'String',
:'value' => :'SyntheticsMobileStepParamsValue',
:'variable' => :'SyntheticsMobileStepParamsVariable',
:'with_enter' => :'Boolean',
:'x' => :'Integer',
:'y' => :'Integer'
:'x' => :'Float',
:'y' => :'Float'
}
end

Expand Down Expand Up @@ -136,8 +136,8 @@ def initialize(attributes = {})
self.element = attributes[:'element']
end

if attributes.key?(:'enable')
self.enable = attributes[:'enable']
if attributes.key?(:'enabled')
self.enabled = attributes[:'enabled']
end

if attributes.key?(:'max_scrolls')
Expand Down Expand Up @@ -227,7 +227,7 @@ def ==(o)
delay == o.delay &&
direction == o.direction &&
element == o.element &&
enable == o.enable &&
enabled == o.enabled &&
max_scrolls == o.max_scrolls &&
positions == o.positions &&
subtest_public_id == o.subtest_public_id &&
Expand All @@ -243,7 +243,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[check, delay, direction, element, enable, max_scrolls, positions, subtest_public_id, value, variable, with_enter, x, y].hash
[check, delay, direction, element, enabled, max_scrolls, positions, subtest_public_id, value, variable, with_enter, x, y].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'x' => :'Integer',
:'y' => :'Integer'
:'x' => :'Float',
:'y' => :'Float'
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'x' => :'Integer',
:'y' => :'Integer'
:'x' => :'Float',
:'y' => :'Float'
}
end

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
=begin
#Datadog API V1 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: [email protected]
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V1
# Values used in the step for in multiple step types.
module SyntheticsMobileStepParamsValue
class << self
include BaseOneOfModel
include BaseOneOfModelNoDiscriminator

# List of class defined in oneOf (OpenAPI v3)
def openapi_one_of
[
:'String',
:'Integer'
]
end
# Builds the object
# @param data [Mixed] Data to be matched against the list of oneOf items
# @return [Object] Returns the model or the data itself
def build(data)
# Go through the list of oneOf items and attempt to identify the appropriate one.
# Note:
# - We do not attempt to check whether exactly one item matches.
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
# - TODO: scalar values are de facto behaving as if they were nullable.
# - TODO: logging when debugging is set.
openapi_one_of.each do |klass|
begin
next if klass == :AnyType # "nullable: true"
typed_data = find_and_cast_into_type(klass, data)
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
return typed_data if typed_data
rescue # rescue all errors so we keep iterating even if the current item lookup raises
end
end

if openapi_one_of.include?(:AnyType)
data
else
self._unparsed = true
DatadogAPIClient::UnparsedObject.new(data)
end
end
end
end
end
Loading