From 9659fea9e9140e6833953286cf8972e7b7856507 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Sun, 22 Feb 2026 20:56:54 +0000 Subject: [PATCH] Regenerate client from commit 5ee7c11 of spec repo --- .generator/schemas/v2/openapi.yaml | 19 +++ lib/datadog_api_client/inflector.rb | 2 + .../v2/models/form_trigger.rb | 105 ++++++++++++++ .../v2/models/form_trigger_wrapper.rb | 135 ++++++++++++++++++ lib/datadog_api_client/v2/models/trigger.rb | 1 + 5 files changed, 262 insertions(+) create mode 100644 lib/datadog_api_client/v2/models/form_trigger.rb create mode 100644 lib/datadog_api_client/v2/models/form_trigger_wrapper.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5da2e75e8057..8b24223a1745 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -26516,6 +26516,24 @@ components: required: - data type: object + FormTrigger: + description: Trigger a workflow from a Form. + properties: + formId: + description: The form UUID. + example: '' + type: string + type: object + FormTriggerWrapper: + description: Schema for a Form-based trigger. + properties: + formTrigger: + $ref: '#/components/schemas/FormTrigger' + startStepNames: + $ref: '#/components/schemas/StartStepNames' + required: + - formTrigger + type: object FormulaLimit: description: 'Message for specifying limits to the number of values returned by a query. @@ -66222,6 +66240,7 @@ components: - $ref: '#/components/schemas/DatabaseMonitoringTriggerWrapper' - $ref: '#/components/schemas/DatastoreTriggerWrapper' - $ref: '#/components/schemas/DashboardTriggerWrapper' + - $ref: '#/components/schemas/FormTriggerWrapper' - $ref: '#/components/schemas/GithubWebhookTriggerWrapper' - $ref: '#/components/schemas/IncidentTriggerWrapper' - $ref: '#/components/schemas/MonitorTriggerWrapper' diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 042500238b29..5a40ecc71ef4 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2548,6 +2548,8 @@ def overrides "v2.fleet_schedule_response" => "FleetScheduleResponse", "v2.fleet_schedules_response" => "FleetSchedulesResponse", "v2.fleet_schedule_status" => "FleetScheduleStatus", + "v2.form_trigger" => "FormTrigger", + "v2.form_trigger_wrapper" => "FormTriggerWrapper", "v2.formula_limit" => "FormulaLimit", "v2.framework_handle_and_version_response_data" => "FrameworkHandleAndVersionResponseData", "v2.freshservice_api_key" => "FreshserviceAPIKey", diff --git a/lib/datadog_api_client/v2/models/form_trigger.rb b/lib/datadog_api_client/v2/models/form_trigger.rb new file mode 100644 index 000000000000..2f6fd3c7ad21 --- /dev/null +++ b/lib/datadog_api_client/v2/models/form_trigger.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +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::V2 + # Trigger a workflow from a Form. + class FormTrigger + include BaseGenericModel + + # The form UUID. + attr_accessor :form_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'form_id' => :'formId' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'form_id' => :'String' + } + 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::V2::FormTrigger` 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?(:'form_id') + self.form_id = attributes[:'form_id'] + 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 && + form_id == o.form_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [form_id, additional_properties].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 new file mode 100644 index 000000000000..cb49378b1ccb --- /dev/null +++ b/lib/datadog_api_client/v2/models/form_trigger_wrapper.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +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::V2 + # Schema for a Form-based trigger. + class FormTriggerWrapper + include BaseGenericModel + + # Trigger a workflow from a Form. + attr_reader :form_trigger + + # A list of steps that run first after a trigger fires. + attr_accessor :start_step_names + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'form_trigger' => :'formTrigger', + :'start_step_names' => :'startStepNames' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'form_trigger' => :'FormTrigger', + :'start_step_names' => :'Array' + } + 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::V2::FormTriggerWrapper` 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?(:'form_trigger') + self.form_trigger = attributes[:'form_trigger'] + end + + if attributes.key?(:'start_step_names') + if (value = attributes[:'start_step_names']).is_a?(Array) + self.start_step_names = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @form_trigger.nil? + true + end + + # Custom attribute writer method with validation + # @param form_trigger [Object] Object to be assigned + # @!visibility private + def form_trigger=(form_trigger) + if form_trigger.nil? + fail ArgumentError, 'invalid value for "form_trigger", form_trigger cannot be nil.' + end + @form_trigger = form_trigger + 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 && + form_trigger == o.form_trigger && + start_step_names == o.start_step_names && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [form_trigger, start_step_names, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/trigger.rb b/lib/datadog_api_client/v2/models/trigger.rb index 1073a1a97470..824f08e6d71f 100644 --- a/lib/datadog_api_client/v2/models/trigger.rb +++ b/lib/datadog_api_client/v2/models/trigger.rb @@ -33,6 +33,7 @@ def openapi_one_of :'DatabaseMonitoringTriggerWrapper', :'DatastoreTriggerWrapper', :'DashboardTriggerWrapper', + :'FormTriggerWrapper', :'GithubWebhookTriggerWrapper', :'IncidentTriggerWrapper', :'MonitorTriggerWrapper',