Skip to content
Open
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
39 changes: 29 additions & 10 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20436,6 +20436,7 @@ components:
- times
type: object
CompletionCondition:
additionalProperties: false
description: The definition of `CompletionCondition` object.
properties:
operand1:
Expand Down Expand Up @@ -20479,6 +20480,7 @@ components:
- OPERATOR_IS_EMPTY
- OPERATOR_IS_NOT_EMPTY
CompletionGate:
additionalProperties: false
description: Used to create conditions before running subsequent actions.
properties:
completionCondition:
Expand Down Expand Up @@ -35926,6 +35928,7 @@ components:
type: integer
type: object
ErrorHandler:
additionalProperties: false
description: Used to handle errors in an action.
properties:
fallbackStepName:
Expand Down Expand Up @@ -51711,6 +51714,7 @@ components:
name:
description: The `InputSchemaParameters` `name`.
example: ""
minLength: 1
type: string
type:
$ref: "#/components/schemas/InputSchemaParametersType"
Expand Down Expand Up @@ -78296,11 +78300,13 @@ components:
properties:
branchName:
description: The `OutboundEdge` `branchName`.
example: ""
example: main
minLength: 1
type: string
nextStepName:
description: The `OutboundEdge` `nextStepName`.
example: ""
example: Step2
minLength: 1
type: string
required:
- nextStepName
Expand Down Expand Up @@ -79450,6 +79456,7 @@ components:
name:
description: The `Parameter` `name`.
example: ""
minLength: 1
type: string
value:
description: The `Parameter` `value`.
Expand Down Expand Up @@ -84683,6 +84690,7 @@ components:
- attributes
type: object
ReadinessGate:
additionalProperties: false
description: Used to merge multiple branches into a single branch.
properties:
thresholdType:
Expand Down Expand Up @@ -87164,6 +87172,7 @@ components:
- data
type: object
RetryStrategy:
additionalProperties: false
description: The definition of `RetryStrategy` object.
properties:
kind:
Expand All @@ -87172,6 +87181,7 @@ components:
$ref: "#/components/schemas/RetryStrategyLinear"
required:
- kind
- linear
type: object
RetryStrategyKind:
description: The definition of `RetryStrategyKind` object.
Expand All @@ -87182,17 +87192,21 @@ components:
x-enum-varnames:
- RETRY_STRATEGY_LINEAR
RetryStrategyLinear:
additionalProperties: false
description: The definition of `RetryStrategyLinear` object.
properties:
interval:
description: The `RetryStrategyLinear` `interval`. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
example: ""
pattern: ^[1-9][0-9]*s$
type: string
maxRetries:
description: The `RetryStrategyLinear` `maxRetries`.
example: 0.0
format: double
type: number
example: 0
format: int32
maximum: 2147483647
minimum: 0
type: integer
required:
- interval
- maxRetries
Expand Down Expand Up @@ -103899,7 +103913,7 @@ components:
type: string
type: object
Spec:
description: The spec defines what the workflow does.
description: A complete Workflow Automation definition, including its triggers, steps, and connections.
properties:
annotations:
description: "A list of annotations used in the workflow. These are like sticky notes for your workflow!"
Expand Down Expand Up @@ -104017,11 +104031,12 @@ components:
- type
type: object
StartStepNames:
description: "A list of steps that run first after a trigger fires."
description: "Names of existing workflow steps that run first after a trigger fires."
example:
- ""
items:
description: The `StartStepNames` `items`.
minLength: 1
type: string
type: array
State:
Expand Down Expand Up @@ -105297,6 +105312,7 @@ components:
actionId:
description: The unique identifier of an action.
example: ""
minLength: 1
type: string
completionGate:
$ref: "#/components/schemas/CompletionGate"
Expand All @@ -105313,9 +105329,10 @@ components:
name:
description: Name of the step.
example: ""
minLength: 1
type: string
outboundEdges:
description: A list of subsequent actions to run.
description: A list of subsequent actions to run. This list is empty for a terminal step.
items:
$ref: "#/components/schemas/OutboundEdge"
type: array
Expand All @@ -105331,7 +105348,9 @@ components:
- actionId
type: object
StepDisplay:
description: The definition of `StepDisplay` object.
description: |-
The position of a step on the workflow canvas. Omit `display` from every step to use
automatic layout, or provide it for every step to preserve a manual layout.
properties:
bounds:
$ref: "#/components/schemas/StepDisplayBounds"
Expand Down Expand Up @@ -119084,7 +119103,7 @@ components:
startStepNames:
$ref: "#/components/schemas/StartStepNames"
workflowTrigger:
description: "Trigger a workflow from the Datadog UI. Only required if no other trigger exists."
description: "Trigger a workflow from the Datadog UI. When present, this must be the workflow's only trigger."
type: object
required:
- workflowTrigger
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v2/models/api_trigger_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class APITriggerWrapper
# Trigger a workflow from an API request. The workflow must be published.
attr_reader :api_trigger

# A list of steps that run first after a trigger fires.
# Names of existing workflow steps that run first after a trigger fires.
attr_accessor :start_step_names

attr_accessor :additional_properties
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v2/models/app_trigger_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AppTriggerWrapper
# Trigger a workflow from an App.
attr_reader :app_trigger

# A list of steps that run first after a trigger fires.
# Names of existing workflow steps that run first after a trigger fires.
attr_accessor :start_step_names

attr_accessor :additional_properties
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v2/models/case_trigger_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CaseTriggerWrapper
# Trigger a workflow from a Case. For automatic triggering a handle must be configured and the workflow must be published.
attr_reader :case_trigger

# A list of steps that run first after a trigger fires.
# Names of existing workflow steps that run first after a trigger fires.
attr_accessor :start_step_names

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ChangeEventTriggerWrapper
# Trigger a workflow from a Change Event.
attr_reader :change_event_trigger

# A list of steps that run first after a trigger fires.
# Names of existing workflow steps that run first after a trigger fires.
attr_accessor :start_step_names

attr_accessor :additional_properties
Expand Down
33 changes: 4 additions & 29 deletions lib/datadog_api_client/v2/models/completion_condition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class CompletionCondition
# The definition of `CompletionConditionOperator` object.
attr_reader :operator

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
Expand Down Expand Up @@ -60,14 +58,12 @@ def initialize(attributes = {})
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CompletionCondition` 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
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CompletionCondition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}

if attributes.key?(:'operand1')
Expand Down Expand Up @@ -112,26 +108,6 @@ def operator=(operator)
@operator = operator
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
Expand All @@ -140,15 +116,14 @@ def ==(o)
self.class == o.class &&
operand1 == o.operand1 &&
operand2 == o.operand2 &&
operator == o.operator &&
additional_properties == o.additional_properties
operator == o.operator
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[operand1, operand2, operator, additional_properties].hash
[operand1, operand2, operator].hash
end
end
end
33 changes: 4 additions & 29 deletions lib/datadog_api_client/v2/models/completion_gate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class CompletionGate
# The definition of `RetryStrategy` object.
attr_reader :retry_strategy

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
Expand All @@ -55,14 +53,12 @@ def initialize(attributes = {})
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CompletionGate` 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
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CompletionGate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}

if attributes.key?(:'completion_condition')
Expand Down Expand Up @@ -103,42 +99,21 @@ def retry_strategy=(retry_strategy)
@retry_strategy = retry_strategy
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 &&
completion_condition == o.completion_condition &&
retry_strategy == o.retry_strategy &&
additional_properties == o.additional_properties
retry_strategy == o.retry_strategy
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[completion_condition, retry_strategy, additional_properties].hash
[completion_condition, retry_strategy].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DashboardTriggerWrapper
# Trigger a workflow from a Dashboard.
attr_reader :dashboard_trigger

# A list of steps that run first after a trigger fires.
# Names of existing workflow steps that run first after a trigger fires.
attr_accessor :start_step_names

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DatabaseMonitoringTriggerWrapper
# Trigger a workflow from Database Monitoring.
attr_reader :database_monitoring_trigger

# A list of steps that run first after a trigger fires.
# Names of existing workflow steps that run first after a trigger fires.
attr_accessor :start_step_names

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DatastoreTriggerWrapper
# Trigger a workflow from a Datastore. For automatic triggering a handle must be configured and the workflow must be published.
attr_reader :datastore_trigger

# A list of steps that run first after a trigger fires.
# Names of existing workflow steps that run first after a trigger fires.
attr_accessor :start_step_names

attr_accessor :additional_properties
Expand Down
Loading
Loading