diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 05592fbb5535..eeb537b688dc 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -20436,6 +20436,7 @@ components: - times type: object CompletionCondition: + additionalProperties: false description: The definition of `CompletionCondition` object. properties: operand1: @@ -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: @@ -35926,6 +35928,7 @@ components: type: integer type: object ErrorHandler: + additionalProperties: false description: Used to handle errors in an action. properties: fallbackStepName: @@ -51711,6 +51714,7 @@ components: name: description: The `InputSchemaParameters` `name`. example: "" + minLength: 1 type: string type: $ref: "#/components/schemas/InputSchemaParametersType" @@ -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 @@ -79450,6 +79456,7 @@ components: name: description: The `Parameter` `name`. example: "" + minLength: 1 type: string value: description: The `Parameter` `value`. @@ -84683,6 +84690,7 @@ components: - attributes type: object ReadinessGate: + additionalProperties: false description: Used to merge multiple branches into a single branch. properties: thresholdType: @@ -87164,6 +87172,7 @@ components: - data type: object RetryStrategy: + additionalProperties: false description: The definition of `RetryStrategy` object. properties: kind: @@ -87172,6 +87181,7 @@ components: $ref: "#/components/schemas/RetryStrategyLinear" required: - kind + - linear type: object RetryStrategyKind: description: The definition of `RetryStrategyKind` object. @@ -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 @@ -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!" @@ -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: @@ -105297,6 +105312,7 @@ components: actionId: description: The unique identifier of an action. example: "" + minLength: 1 type: string completionGate: $ref: "#/components/schemas/CompletionGate" @@ -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 @@ -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" @@ -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 diff --git a/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb index 289a375844b2..8ff5b9be5b50 100644 --- a/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb @@ -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 diff --git a/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb index 3f590e4d6388..a93c126a98d9 100644 --- a/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb @@ -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 diff --git a/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb index 5b8943e0d1ba..ccc46ed1490c 100644 --- a/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb @@ -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 diff --git a/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb index 0bf673399a10..e2c97e863cba 100644 --- a/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb @@ -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 diff --git a/lib/datadog_api_client/v2/models/completion_condition.rb b/lib/datadog_api_client/v2/models/completion_condition.rb index e323261f925e..a123784aa588 100644 --- a/lib/datadog_api_client/v2/models/completion_condition.rb +++ b/lib/datadog_api_client/v2/models/completion_condition.rb @@ -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 @@ -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') @@ -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 @@ -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 diff --git a/lib/datadog_api_client/v2/models/completion_gate.rb b/lib/datadog_api_client/v2/models/completion_gate.rb index 770116de4a54..736f43701f80 100644 --- a/lib/datadog_api_client/v2/models/completion_gate.rb +++ b/lib/datadog_api_client/v2/models/completion_gate.rb @@ -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 @@ -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') @@ -103,26 +99,6 @@ 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 @@ -130,15 +106,14 @@ 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 diff --git a/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb index 672034601fc8..125cee064414 100644 --- a/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb @@ -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 diff --git a/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb index 23d13f826c2d..149802df7520 100644 --- a/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb @@ -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 diff --git a/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb index c48a68dfd283..785af7d905a8 100644 --- a/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb @@ -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 diff --git a/lib/datadog_api_client/v2/models/error_handler.rb b/lib/datadog_api_client/v2/models/error_handler.rb index 4ecbcaaeba98..241275441926 100644 --- a/lib/datadog_api_client/v2/models/error_handler.rb +++ b/lib/datadog_api_client/v2/models/error_handler.rb @@ -27,8 +27,6 @@ class ErrorHandler # 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 @@ -55,14 +53,12 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ErrorHandler` 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::ErrorHandler`. 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?(:'fallback_step_name') @@ -103,26 +99,6 @@ 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 @@ -130,15 +106,14 @@ def ==(o) return true if self.equal?(o) self.class == o.class && fallback_step_name == o.fallback_step_name && - 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 - [fallback_step_name, retry_strategy, additional_properties].hash + [fallback_step_name, retry_strategy].hash end end end diff --git a/lib/datadog_api_client/v2/models/form_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/form_trigger_wrapper.rb index cb49378b1ccb..cb929b05c119 100644 --- a/lib/datadog_api_client/v2/models/form_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/form_trigger_wrapper.rb @@ -24,7 +24,7 @@ class FormTriggerWrapper # Trigger a workflow from a Form. attr_reader :form_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 diff --git a/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb index a16a258b1b39..b542ef8d491a 100644 --- a/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb @@ -24,7 +24,7 @@ class GithubWebhookTriggerWrapper # Trigger a workflow from a GitHub webhook. To trigger a workflow from GitHub, you must set a `webhookSecret`. In your GitHub Webhook Settings, set the Payload URL to "base_url"/api/v2/workflows/"workflow_id"/webhook?orgId="org_id", select application/json for the content type, and be highly recommend enabling SSL verification for security. The workflow must be published. attr_reader :github_webhook_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 diff --git a/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb index 1caa6638f245..f0a445e68b9e 100644 --- a/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb @@ -24,7 +24,7 @@ class IncidentTriggerWrapper # Trigger a workflow from an Incident. For automatic triggering a handle must be configured and the workflow must be published. attr_reader :incident_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 diff --git a/lib/datadog_api_client/v2/models/input_schema_parameters.rb b/lib/datadog_api_client/v2/models/input_schema_parameters.rb index 7405e063422a..0179b36f4a54 100644 --- a/lib/datadog_api_client/v2/models/input_schema_parameters.rb +++ b/lib/datadog_api_client/v2/models/input_schema_parameters.rb @@ -124,6 +124,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @name.nil? + return false if @name.to_s.length < 1 return false if @type.nil? true end @@ -135,6 +136,9 @@ def name=(name) if name.nil? fail ArgumentError, 'invalid value for "name", name cannot be nil.' end + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end @name = name end diff --git a/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb index 6d8d047c0808..44c916fe1549 100644 --- a/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb @@ -24,7 +24,7 @@ class MonitorTriggerWrapper # Trigger a workflow from a Monitor. For automatic triggering a handle must be configured and the workflow must be published. attr_reader :monitor_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 diff --git a/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb index 739541677edd..88824ed22c20 100644 --- a/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb @@ -24,7 +24,7 @@ class NotebookTriggerWrapper # Trigger a workflow from a Notebook. attr_reader :notebook_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 diff --git a/lib/datadog_api_client/v2/models/on_call_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/on_call_trigger_wrapper.rb index 8119f0e9518f..db97c2da72f1 100644 --- a/lib/datadog_api_client/v2/models/on_call_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/on_call_trigger_wrapper.rb @@ -24,7 +24,7 @@ class OnCallTriggerWrapper # Trigger a workflow from an On-Call Page or On-Call Handover. For automatic triggering a handle must be configured and the workflow must be published. attr_reader :on_call_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 diff --git a/lib/datadog_api_client/v2/models/outbound_edge.rb b/lib/datadog_api_client/v2/models/outbound_edge.rb index 0765af2e3f1b..492260c0bf48 100644 --- a/lib/datadog_api_client/v2/models/outbound_edge.rb +++ b/lib/datadog_api_client/v2/models/outbound_edge.rb @@ -79,7 +79,9 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @branch_name.nil? + return false if @branch_name.to_s.length < 1 return false if @next_step_name.nil? + return false if @next_step_name.to_s.length < 1 true end @@ -90,6 +92,9 @@ def branch_name=(branch_name) if branch_name.nil? fail ArgumentError, 'invalid value for "branch_name", branch_name cannot be nil.' end + if branch_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "branch_name", the character length must be great than or equal to 1.' + end @branch_name = branch_name end @@ -100,6 +105,9 @@ def next_step_name=(next_step_name) if next_step_name.nil? fail ArgumentError, 'invalid value for "next_step_name", next_step_name cannot be nil.' end + if next_step_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "next_step_name", the character length must be great than or equal to 1.' + end @next_step_name = next_step_name end diff --git a/lib/datadog_api_client/v2/models/parameter.rb b/lib/datadog_api_client/v2/models/parameter.rb index 7843e6e19aaf..2e2d11ffbbba 100644 --- a/lib/datadog_api_client/v2/models/parameter.rb +++ b/lib/datadog_api_client/v2/models/parameter.rb @@ -79,6 +79,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @name.nil? + return false if @name.to_s.length < 1 return false if @value.nil? true end @@ -90,6 +91,9 @@ def name=(name) if name.nil? fail ArgumentError, 'invalid value for "name", name cannot be nil.' end + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end @name = name end diff --git a/lib/datadog_api_client/v2/models/readiness_gate.rb b/lib/datadog_api_client/v2/models/readiness_gate.rb index f6806cff4dae..c9e4dd982318 100644 --- a/lib/datadog_api_client/v2/models/readiness_gate.rb +++ b/lib/datadog_api_client/v2/models/readiness_gate.rb @@ -24,8 +24,6 @@ class ReadinessGate # The definition of `ReadinessGateThresholdType` object. attr_reader :threshold_type - attr_accessor :additional_properties - # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -50,14 +48,12 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReadinessGate` 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::ReadinessGate`. 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?(:'threshold_type') @@ -83,41 +79,20 @@ def threshold_type=(threshold_type) @threshold_type = threshold_type 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 && - threshold_type == o.threshold_type && - additional_properties == o.additional_properties + threshold_type == o.threshold_type end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [threshold_type, additional_properties].hash + [threshold_type].hash end end end diff --git a/lib/datadog_api_client/v2/models/retry_strategy.rb b/lib/datadog_api_client/v2/models/retry_strategy.rb index 8eb194b7ac90..a8616353fc72 100644 --- a/lib/datadog_api_client/v2/models/retry_strategy.rb +++ b/lib/datadog_api_client/v2/models/retry_strategy.rb @@ -25,9 +25,7 @@ class RetryStrategy attr_reader :kind # The definition of `RetryStrategyLinear` object. - attr_accessor :linear - - attr_accessor :additional_properties + attr_reader :linear # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private @@ -55,14 +53,12 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetryStrategy` 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::RetryStrategy`. 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?(:'kind') @@ -79,6 +75,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @kind.nil? + return false if @linear.nil? true end @@ -92,24 +89,14 @@ def kind=(kind) @kind = kind end - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash + # Custom attribute writer method with validation + # @param linear [Object] Object to be assigned # @!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 + def linear=(linear) + if linear.nil? + fail ArgumentError, 'invalid value for "linear", linear cannot be nil.' end - hash + @linear = linear end # Checks equality by comparing each attribute. @@ -119,15 +106,14 @@ def ==(o) return true if self.equal?(o) self.class == o.class && kind == o.kind && - linear == o.linear && - additional_properties == o.additional_properties + linear == o.linear end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [kind, linear, additional_properties].hash + [kind, linear].hash end end end diff --git a/lib/datadog_api_client/v2/models/retry_strategy_linear.rb b/lib/datadog_api_client/v2/models/retry_strategy_linear.rb index 373c4a74d579..eeebf18acfac 100644 --- a/lib/datadog_api_client/v2/models/retry_strategy_linear.rb +++ b/lib/datadog_api_client/v2/models/retry_strategy_linear.rb @@ -27,8 +27,6 @@ class RetryStrategyLinear # The `RetryStrategyLinear` `maxRetries`. attr_reader :max_retries - attr_accessor :additional_properties - # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map @@ -43,7 +41,7 @@ def self.attribute_map def self.openapi_types { :'interval' => :'String', - :'max_retries' => :'Float' + :'max_retries' => :'Integer' } end @@ -55,14 +53,12 @@ def initialize(attributes = {}) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetryStrategyLinear` 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::RetryStrategyLinear`. 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?(:'interval') @@ -79,7 +75,11 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @interval.nil? + pattern = Regexp.new(/^[1-9][0-9]*s$/) + return false if @interval !~ pattern return false if @max_retries.nil? + return false if @max_retries > 2147483647 + return false if @max_retries < 0 true end @@ -90,6 +90,10 @@ def interval=(interval) if interval.nil? fail ArgumentError, 'invalid value for "interval", interval cannot be nil.' end + pattern = Regexp.new(/^[1-9][0-9]*s$/) + if interval !~ pattern + fail ArgumentError, "invalid value for \"interval\", must conform to the pattern #{pattern}." + end @interval = interval end @@ -100,27 +104,13 @@ def max_retries=(max_retries) if max_retries.nil? fail ArgumentError, 'invalid value for "max_retries", max_retries cannot be nil.' end - @max_retries = max_retries - 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) + if max_retries > 2147483647 + fail ArgumentError, 'invalid value for "max_retries", must be smaller than or equal to 2147483647.' end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value + if max_retries < 0 + fail ArgumentError, 'invalid value for "max_retries", must be greater than or equal to 0.' end - hash + @max_retries = max_retries end # Checks equality by comparing each attribute. @@ -130,15 +120,14 @@ def ==(o) return true if self.equal?(o) self.class == o.class && interval == o.interval && - max_retries == o.max_retries && - additional_properties == o.additional_properties + max_retries == o.max_retries end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [interval, max_retries, additional_properties].hash + [interval, max_retries].hash end end end diff --git a/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb index 64a76f25c2b4..d486c2ac8040 100644 --- a/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb @@ -24,7 +24,7 @@ class ScheduleTriggerWrapper # Trigger a workflow from a Schedule. The workflow must be published. attr_reader :schedule_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 diff --git a/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb index 7c5e0bfcd627..bdc27dad76dd 100644 --- a/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb @@ -24,7 +24,7 @@ class SecurityTriggerWrapper # Trigger a workflow from a Security Signal or Finding. For automatic triggering a handle must be configured and the workflow must be published. attr_reader :security_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 diff --git a/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb index 66facb3dc65e..cb9aea252712 100644 --- a/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb @@ -24,7 +24,7 @@ class SelfServiceTriggerWrapper # Trigger a workflow from Self Service. attr_reader :self_service_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 diff --git a/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb index 414349de8de3..ebe9c6948439 100644 --- a/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb @@ -24,7 +24,7 @@ class SlackTriggerWrapper # Trigger a workflow from Slack. The workflow must be published. attr_reader :slack_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 diff --git a/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb index f863c8aa47b4..efb33a6aa866 100644 --- a/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb @@ -24,7 +24,7 @@ class SoftwareCatalogTriggerWrapper # Trigger a workflow from Software Catalog. attr_reader :software_catalog_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 diff --git a/lib/datadog_api_client/v2/models/spec.rb b/lib/datadog_api_client/v2/models/spec.rb index 8fc0667e46df..34ebf82dcda8 100644 --- a/lib/datadog_api_client/v2/models/spec.rb +++ b/lib/datadog_api_client/v2/models/spec.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The spec defines what the workflow does. + # A complete Workflow Automation definition, including its triggers, steps, and connections. class Spec include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/step.rb b/lib/datadog_api_client/v2/models/step.rb index 9d7a70bf1241..9be6cd926085 100644 --- a/lib/datadog_api_client/v2/models/step.rb +++ b/lib/datadog_api_client/v2/models/step.rb @@ -30,7 +30,8 @@ class Step # The unique identifier of a connection defined in the spec. attr_accessor :connection_label - # The definition of `StepDisplay` object. + # 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. attr_accessor :display # The `Step` `errorHandlers`. @@ -39,7 +40,7 @@ class Step # Name of the step. attr_reader :name - # A list of subsequent actions to run. + # A list of subsequent actions to run. This list is empty for a terminal step. attr_accessor :outbound_edges # A list of inputs for an action. @@ -148,7 +149,9 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @action_id.nil? + return false if @action_id.to_s.length < 1 return false if @name.nil? + return false if @name.to_s.length < 1 true end @@ -159,6 +162,9 @@ def action_id=(action_id) if action_id.nil? fail ArgumentError, 'invalid value for "action_id", action_id cannot be nil.' end + if action_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "action_id", the character length must be great than or equal to 1.' + end @action_id = action_id end @@ -169,6 +175,9 @@ def name=(name) if name.nil? fail ArgumentError, 'invalid value for "name", name cannot be nil.' end + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end @name = name end diff --git a/lib/datadog_api_client/v2/models/step_display.rb b/lib/datadog_api_client/v2/models/step_display.rb index 40fbcb6bae69..b37e390ad069 100644 --- a/lib/datadog_api_client/v2/models/step_display.rb +++ b/lib/datadog_api_client/v2/models/step_display.rb @@ -17,7 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `StepDisplay` object. + # 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. class StepDisplay include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/workflow_data_attributes.rb b/lib/datadog_api_client/v2/models/workflow_data_attributes.rb index 0040f7a264f8..758af3c4cd13 100644 --- a/lib/datadog_api_client/v2/models/workflow_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/workflow_data_attributes.rb @@ -33,7 +33,7 @@ class WorkflowDataAttributes # Set the workflow to published or unpublished. Workflows in an unpublished state will only be executable via manual runs. Automatic triggers such as Schedule will not execute the workflow until it is published. attr_accessor :published - # The spec defines what the workflow does. + # A complete Workflow Automation definition, including its triggers, steps, and connections. attr_reader :spec # Tags of the workflow. diff --git a/lib/datadog_api_client/v2/models/workflow_data_update_attributes.rb b/lib/datadog_api_client/v2/models/workflow_data_update_attributes.rb index eb59d48251b5..51dd1596d57e 100644 --- a/lib/datadog_api_client/v2/models/workflow_data_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/workflow_data_update_attributes.rb @@ -33,7 +33,7 @@ class WorkflowDataUpdateAttributes # Set the workflow to published or unpublished. Workflows in an unpublished state will only be executable via manual runs. Automatic triggers such as Schedule will not execute the workflow until it is published. attr_accessor :published - # The spec defines what the workflow does. + # A complete Workflow Automation definition, including its triggers, steps, and connections. attr_accessor :spec # Tags of the workflow. diff --git a/lib/datadog_api_client/v2/models/workflow_list_item_attributes.rb b/lib/datadog_api_client/v2/models/workflow_list_item_attributes.rb index 47f5c50c080e..0b1378512e64 100644 --- a/lib/datadog_api_client/v2/models/workflow_list_item_attributes.rb +++ b/lib/datadog_api_client/v2/models/workflow_list_item_attributes.rb @@ -33,7 +33,7 @@ class WorkflowListItemAttributes # Whether the workflow is published. Unpublished workflows can only be run manually. Automatic triggers such as Schedule do not fire until the workflow is published. attr_accessor :published - # The spec defines what the workflow does. + # A complete Workflow Automation definition, including its triggers, steps, and connections. attr_accessor :spec # Tags of the workflow. diff --git a/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb index 986f09d8a3f8..8e80135b27c6 100644 --- a/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb @@ -21,10 +21,10 @@ module DatadogAPIClient::V2 class WorkflowTriggerWrapper include BaseGenericModel - # 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 - # Trigger a workflow from the Datadog UI. Only required if no other trigger exists. + # Trigger a workflow from the Datadog UI. When present, this must be the workflow's only trigger. attr_reader :workflow_trigger attr_accessor :additional_properties