From fe571e12ed76b64aa3bfe4fdc626409763c7b7af Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 12 Aug 2026 12:08:48 +0000 Subject: [PATCH] Regenerate client from commit 3a1d4b2 of spec repo --- .generator/schemas/v2/openapi.yaml | 17 +++ lib/datadog_api_client/inflector.rb | 2 + .../v2/models/agent_trigger.rb | 105 ++++++++++++++ .../v2/models/agent_trigger_wrapper.rb | 135 ++++++++++++++++++ lib/datadog_api_client/v2/models/trigger.rb | 1 + 5 files changed, 260 insertions(+) create mode 100644 lib/datadog_api_client/v2/models/agent_trigger.rb create mode 100644 lib/datadog_api_client/v2/models/agent_trigger_wrapper.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index bf83e44268fb..a5b1012c5d22 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4591,6 +4591,22 @@ components: - id - base_severity type: object + AgentTrigger: + description: "Trigger a workflow from an agent via the MCP execute tool. Workflow can be executed from Bits Chat, Bits Agent Builder, Claude Code, Codex, Cursor, and any other coding agent using the Datadog MCP." + properties: + rateLimit: + $ref: "#/components/schemas/TriggerRateLimit" + type: object + AgentTriggerWrapper: + description: "Schema for an agent-based trigger." + properties: + agentTrigger: + $ref: "#/components/schemas/AgentTrigger" + startStepNames: + $ref: "#/components/schemas/StartStepNames" + required: + - agentTrigger + type: object AggregatedHighFrozenFrameRate: description: Aggregated high frozen frame rate detection at view level. properties: @@ -114425,6 +114441,7 @@ components: Trigger: description: "One of the triggers that can start the execution of a workflow." oneOf: + - $ref: "#/components/schemas/AgentTriggerWrapper" - $ref: "#/components/schemas/APITriggerWrapper" - $ref: "#/components/schemas/AppTriggerWrapper" - $ref: "#/components/schemas/CaseTriggerWrapper" diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index debc58b13276..8c9591985f8a 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1215,6 +1215,8 @@ def overrides "v2.active_billing_dimensions_type" => "ActiveBillingDimensionsType", "v2.add_member_team_request" => "AddMemberTeamRequest", "v2.advisory" => "Advisory", + "v2.agent_trigger" => "AgentTrigger", + "v2.agent_trigger_wrapper" => "AgentTriggerWrapper", "v2.aggregated_high_frozen_frame_rate" => "AggregatedHighFrozenFrameRate", "v2.aggregated_high_script_eval" => "AggregatedHighScriptEval", "v2.aggregated_long_tasks_by_invoker_type" => "AggregatedLongTasksByInvokerType", diff --git a/lib/datadog_api_client/v2/models/agent_trigger.rb b/lib/datadog_api_client/v2/models/agent_trigger.rb new file mode 100644 index 000000000000..4645db948d79 --- /dev/null +++ b/lib/datadog_api_client/v2/models/agent_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 an agent via the MCP execute tool. Workflow can be executed from Bits Chat, Bits Agent Builder, Claude Code, Codex, Cursor, and any other coding agent using the Datadog MCP. + class AgentTrigger + include BaseGenericModel + + # Defines a rate limit for a trigger. + attr_accessor :rate_limit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'rate_limit' => :'rateLimit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'rate_limit' => :'TriggerRateLimit' + } + 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::AgentTrigger` 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?(:'rate_limit') + self.rate_limit = attributes[:'rate_limit'] + 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 && + rate_limit == o.rate_limit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [rate_limit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/agent_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/agent_trigger_wrapper.rb new file mode 100644 index 000000000000..28148082257d --- /dev/null +++ b/lib/datadog_api_client/v2/models/agent_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 an agent-based trigger. + class AgentTriggerWrapper + include BaseGenericModel + + # Trigger a workflow from an agent via the MCP execute tool. Workflow can be executed from Bits Chat, Bits Agent Builder, Claude Code, Codex, Cursor, and any other coding agent using the Datadog MCP. + attr_reader :agent_trigger + + # Names of existing workflow 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 + { + :'agent_trigger' => :'agentTrigger', + :'start_step_names' => :'startStepNames' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'agent_trigger' => :'AgentTrigger', + :'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::AgentTriggerWrapper` 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?(:'agent_trigger') + self.agent_trigger = attributes[:'agent_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 @agent_trigger.nil? + true + end + + # Custom attribute writer method with validation + # @param agent_trigger [Object] Object to be assigned + # @!visibility private + def agent_trigger=(agent_trigger) + if agent_trigger.nil? + fail ArgumentError, 'invalid value for "agent_trigger", agent_trigger cannot be nil.' + end + @agent_trigger = agent_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 && + agent_trigger == o.agent_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 + [agent_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 824f08e6d71f..dab2486597c6 100644 --- a/lib/datadog_api_client/v2/models/trigger.rb +++ b/lib/datadog_api_client/v2/models/trigger.rb @@ -26,6 +26,7 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ + :'AgentTriggerWrapper', :'APITriggerWrapper', :'AppTriggerWrapper', :'CaseTriggerWrapper',