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
52 changes: 49 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16568,7 +16568,7 @@ components:
tests:
description: Array of Synthetic tests configuration.
items:
$ref: '#/components/schemas/SyntheticsTestDetails'
$ref: '#/components/schemas/SyntheticsTestDetailsWithoutSteps'
type: array
type: object
SyntheticsLocalVariableParsingOptionsType:
Expand Down Expand Up @@ -17599,7 +17599,7 @@ components:
status:
$ref: '#/components/schemas/SyntheticsTestPauseStatus'
steps:
description: For browser test, the steps of the test.
description: The steps of the test if they exist.
items:
$ref: '#/components/schemas/SyntheticsStep'
type: array
Expand Down Expand Up @@ -17651,6 +17651,52 @@ components:
- API
- BROWSER
- MOBILE
SyntheticsTestDetailsWithoutSteps:
description: Object containing details about your Synthetic test, without test
steps.
properties:
config:
$ref: '#/components/schemas/SyntheticsTestConfig'
creator:
$ref: '#/components/schemas/Creator'
locations:
description: Array of locations used to run the test.
example:
- aws:eu-west-3
items:
description: A location from which the test was run.
type: string
type: array
message:
description: Notification message associated with the test.
type: string
monitor_id:
description: The associated monitor ID.
format: int64
readOnly: true
type: integer
name:
description: Name of the test.
type: string
options:
$ref: '#/components/schemas/SyntheticsTestOptions'
public_id:
description: The test public ID.
readOnly: true
type: string
status:
$ref: '#/components/schemas/SyntheticsTestPauseStatus'
subtype:
$ref: '#/components/schemas/SyntheticsTestDetailsSubType'
tags:
description: Array of tags attached to the test.
items:
description: A tag attached to the test.
type: string
type: array
type:
$ref: '#/components/schemas/SyntheticsTestDetailsType'
type: object
SyntheticsTestExecutionRule:
description: Execution rule for a Synthetic test.
enum:
Expand Down Expand Up @@ -35243,7 +35289,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/SyntheticsTestDetails'
$ref: '#/components/schemas/SyntheticsTestDetailsWithoutSteps'
description: OK
'403':
content:
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 @@ -727,6 +727,7 @@ def overrides
"v1.synthetics_test_details" => "SyntheticsTestDetails",
"v1.synthetics_test_details_sub_type" => "SyntheticsTestDetailsSubType",
"v1.synthetics_test_details_type" => "SyntheticsTestDetailsType",
"v1.synthetics_test_details_without_steps" => "SyntheticsTestDetailsWithoutSteps",
"v1.synthetics_test_execution_rule" => "SyntheticsTestExecutionRule",
"v1.synthetics_test_monitor_status" => "SyntheticsTestMonitorStatus",
"v1.synthetics_test_options" => "SyntheticsTestOptions",
Expand Down
6 changes: 3 additions & 3 deletions lib/datadog_api_client/v1/api/synthetics_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ def get_test(public_id, opts = {})
#
# @param public_id [String] The public ID of the test to get details from.
# @param opts [Hash] the optional parameters
# @return [Array<(SyntheticsTestDetails, Integer, Hash)>] SyntheticsTestDetails data, response status code and response headers
# @return [Array<(SyntheticsTestDetailsWithoutSteps, Integer, Hash)>] SyntheticsTestDetailsWithoutSteps data, response status code and response headers
def get_test_with_http_info(public_id, opts = {})

if @api_client.config.debugging
Expand Down Expand Up @@ -1473,7 +1473,7 @@ def get_test_with_http_info(public_id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'SyntheticsTestDetails'
return_type = opts[:debug_return_type] || 'SyntheticsTestDetailsWithoutSteps'

# auth_names
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
Expand Down Expand Up @@ -1687,7 +1687,7 @@ def list_tests_with_http_info(opts = {})
#
# To use it you need to use a block: list_tests_with_pagination { |item| p item }
#
# @yield [SyntheticsTestDetails] Paginated items
# @yield [SyntheticsTestDetailsWithoutSteps] Paginated items
def list_tests_with_pagination(opts = {})
api_version = "V1"
page_size = @api_client.get_attribute_from_path(opts, "page_size", 100)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'tests' => :'Array<SyntheticsTestDetails>'
:'tests' => :'Array<SyntheticsTestDetailsWithoutSteps>'
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SyntheticsTestDetails
# Synthetic test.
attr_accessor :status

# For browser test, the steps of the test.
# The steps of the test if they exist.
attr_accessor :steps

# The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
=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
# Object containing details about your Synthetic test, without test steps.
class SyntheticsTestDetailsWithoutSteps
include BaseGenericModel

# Configuration object for a Synthetic test.
attr_accessor :config

# Object describing the creator of the shared element.
attr_accessor :creator

# Array of locations used to run the test.
attr_accessor :locations

# Notification message associated with the test.
attr_accessor :message

# The associated monitor ID.
attr_accessor :monitor_id

# Name of the test.
attr_accessor :name

# Object describing the extra options for a Synthetic test.
attr_accessor :options

# The test public ID.
attr_accessor :public_id

# Define whether you want to start (`live`) or pause (`paused`) a
# Synthetic test.
attr_accessor :status

# The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,
# `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`.
attr_accessor :subtype

# Array of tags attached to the test.
attr_accessor :tags

# Type of the Synthetic test, either `api` or `browser`.
attr_accessor :type

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'config' => :'config',
:'creator' => :'creator',
:'locations' => :'locations',
:'message' => :'message',
:'monitor_id' => :'monitor_id',
:'name' => :'name',
:'options' => :'options',
:'public_id' => :'public_id',
:'status' => :'status',
:'subtype' => :'subtype',
:'tags' => :'tags',
:'type' => :'type'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'config' => :'SyntheticsTestConfig',
:'creator' => :'Creator',
:'locations' => :'Array<String>',
:'message' => :'String',
:'monitor_id' => :'Integer',
:'name' => :'String',
:'options' => :'SyntheticsTestOptions',
:'public_id' => :'String',
:'status' => :'SyntheticsTestPauseStatus',
:'subtype' => :'SyntheticsTestDetailsSubType',
:'tags' => :'Array<String>',
:'type' => :'SyntheticsTestDetailsType'
}
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestDetailsWithoutSteps` initialize method"
end

self.additional_properties = {}
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
self.additional_properties[k.to_sym] = v
else
h[k.to_sym] = v
end
}

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

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

if attributes.key?(:'locations')
if (value = attributes[:'locations']).is_a?(Array)
self.locations = value
end
end

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

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

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

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

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

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

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

if attributes.key?(:'tags')
if (value = attributes[:'tags']).is_a?(Array)
self.tags = value
end
end

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

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end

hash[param] = _to_hash(value)
end
self.additional_properties.each_pair do |attr, value|
hash[attr] = value
end
hash
end

# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
config == o.config &&
creator == o.creator &&
locations == o.locations &&
message == o.message &&
monitor_id == o.monitor_id &&
name == o.name &&
options == o.options &&
public_id == o.public_id &&
status == o.status &&
subtype == o.subtype &&
tags == o.tags &&
type == o.type &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[config, creator, locations, message, monitor_id, name, options, public_id, status, subtype, tags, type, additional_properties].hash
end
end
end
Loading