From 0e3aee191167bc9ddca4f1b553470bfa4c7be1f9 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 25 Mar 2025 18:26:49 +0000 Subject: [PATCH] Regenerate client from commit b25d7c85 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 76 ++++++++-- lib/datadog_api_client/inflector.rb | 4 + .../v2/models/api_trigger.rb | 2 +- .../v2/models/api_trigger_wrapper.rb | 2 +- .../v2/models/app_trigger_wrapper.rb | 2 +- .../v2/models/case_trigger.rb | 2 +- .../v2/models/case_trigger_wrapper.rb | 2 +- .../v2/models/change_event_trigger_wrapper.rb | 2 +- .../v2/models/dashboard_trigger_wrapper.rb | 2 +- .../database_monitoring_trigger_wrapper.rb | 135 ++++++++++++++++++ .../v2/models/github_webhook_trigger.rb | 2 +- .../models/github_webhook_trigger_wrapper.rb | 2 +- .../v2/models/incident_trigger.rb | 2 +- .../v2/models/incident_trigger_wrapper.rb | 2 +- .../v2/models/monitor_trigger.rb | 2 +- .../v2/models/monitor_trigger_wrapper.rb | 2 +- .../v2/models/notebook_trigger_wrapper.rb | 135 ++++++++++++++++++ .../v2/models/schedule_trigger.rb | 2 +- .../v2/models/schedule_trigger_wrapper.rb | 2 +- .../v2/models/security_trigger.rb | 2 +- .../v2/models/security_trigger_wrapper.rb | 2 +- .../v2/models/self_service_trigger_wrapper.rb | 135 ++++++++++++++++++ .../v2/models/slack_trigger_wrapper.rb | 2 +- .../software_catalog_trigger_wrapper.rb | 135 ++++++++++++++++++ lib/datadog_api_client/v2/models/trigger.rb | 4 + .../v2/models/workflow_trigger_wrapper.rb | 2 +- 27 files changed, 633 insertions(+), 37 deletions(-) create mode 100644 lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb create mode 100644 lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb create mode 100644 lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb create mode 100644 lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb diff --git a/.apigentools-info b/.apigentools-info index 7f7d66e0575a..210542fd275c 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-03-24 14:58:39.758624", - "spec_repo_commit": "764de5f0" + "regenerated": "2025-03-25 18:26:19.730337", + "spec_repo_commit": "b25d7c85" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-03-24 14:58:39.774537", - "spec_repo_commit": "764de5f0" + "regenerated": "2025-03-25 18:26:19.746346", + "spec_repo_commit": "b25d7c85" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cd3b7d730ba0..664a9f7ecaec 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1095,7 +1095,7 @@ components: x-enum-varnames: - API_KEYS APITrigger: - description: Trigger a workflow VIA an API. The workflow must be published. + description: Trigger a workflow from an API request. The workflow must be published. properties: rateLimit: $ref: '#/components/schemas/TriggerRateLimit' @@ -2313,7 +2313,7 @@ components: description: Schema for an App-based trigger. properties: appTrigger: - description: Trigger a workflow VIA an App. + description: Trigger a workflow from an App. type: object startStepNames: $ref: '#/components/schemas/StartStepNames' @@ -6525,7 +6525,7 @@ components: - IN_PROGRESS - CLOSED CaseTrigger: - description: Trigger a workflow VIA a Case. For automatic triggering a handle + description: Trigger a workflow from a Case. For automatic triggering a handle must be configured and the workflow must be published. properties: rateLimit: @@ -6762,7 +6762,7 @@ components: description: Schema for a Change Event-based trigger. properties: changeEventTrigger: - description: Trigger a workflow VIA a Change Event. + description: Trigger a workflow from a Change Event. type: object startStepNames: $ref: '#/components/schemas/StartStepNames' @@ -10589,7 +10589,7 @@ components: description: Schema for a Dashboard-based trigger. properties: dashboardTrigger: - description: Trigger a workflow VIA a Dashboard. + description: Trigger a workflow from a Dashboard. type: object startStepNames: $ref: '#/components/schemas/StartStepNames' @@ -10813,6 +10813,17 @@ components: type: string x-enum-varnames: - DATATRANSFORM + DatabaseMonitoringTriggerWrapper: + description: Schema for a Database Monitoring-based trigger. + properties: + databaseMonitoringTrigger: + description: Trigger a workflow from Database Monitoring. + type: object + startStepNames: + $ref: '#/components/schemas/StartStepNames' + required: + - databaseMonitoringTrigger + type: object Date: description: Date as Unix timestamp in milliseconds. example: 1722439510282 @@ -14393,9 +14404,9 @@ components: example: https://github.com/organization/example-repository type: string GithubWebhookTrigger: - description: Trigger a workflow VIA 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", + description: 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. properties: @@ -16706,7 +16717,7 @@ components: x-enum-varnames: - INCIDENT_TODOS IncidentTrigger: - description: Trigger a workflow VIA an Incident. For automatic triggering a + description: Trigger a workflow from an Incident. For automatic triggering a handle must be configured and the workflow must be published. properties: rateLimit: @@ -21179,7 +21190,7 @@ components: $ref: '#/components/schemas/MonitorDowntimeMatchResourceType' type: object MonitorTrigger: - description: Trigger a workflow VIA a Monitor. For automatic triggering a handle + description: Trigger a workflow from a Monitor. For automatic triggering a handle must be configured and the workflow must be published. properties: rateLimit: @@ -21317,6 +21328,17 @@ components: meta: $ref: '#/components/schemas/MonthlyCostAttributionMeta' type: object + NotebookTriggerWrapper: + description: Schema for a Notebook-based trigger. + properties: + notebookTrigger: + description: Trigger a workflow from a Notebook. + type: object + startStepNames: + $ref: '#/components/schemas/StartStepNames' + required: + - notebookTrigger + type: object NotificationRule: description: 'Notification rules allow full control over notifications generated by the various Datadog security products. @@ -26139,7 +26161,7 @@ components: $ref: '#/components/schemas/ScalarFormulaResponseType' type: object ScheduleTrigger: - description: Trigger a workflow VIA a Schedule. The workflow must be published. + description: Trigger a workflow from a Schedule. The workflow must be published. properties: rruleExpression: description: Recurrence rule expression for scheduling. @@ -28436,7 +28458,7 @@ components: type: string type: object SecurityTrigger: - description: Trigger a workflow VIA a Security Signal or Finding. For automatic + description: Trigger a workflow from a Security Signal or Finding. For automatic triggering a handle must be configured and the workflow must be published. properties: rateLimit: @@ -28475,6 +28497,17 @@ components: required: - trigger_source type: object + SelfServiceTriggerWrapper: + description: Schema for a Self Service-based trigger. + properties: + selfServiceTrigger: + description: Trigger a workflow from Self Service. + type: object + startStepNames: + $ref: '#/components/schemas/StartStepNames' + required: + - selfServiceTrigger + type: object SensitiveDataScannerConfigRequest: description: Group reorder request. properties: @@ -30195,7 +30228,7 @@ components: description: Schema for a Slack-based trigger. properties: slackTrigger: - description: Trigger a workflow VIA Slack. The workflow must be published. + description: Trigger a workflow from Slack. The workflow must be published. type: object startStepNames: $ref: '#/components/schemas/StartStepNames' @@ -30249,6 +30282,17 @@ components: required: - attributes type: object + SoftwareCatalogTriggerWrapper: + description: Schema for a Software Catalog-based trigger. + properties: + softwareCatalogTrigger: + description: Trigger a workflow from Software Catalog. + type: object + startStepNames: + $ref: '#/components/schemas/StartStepNames' + required: + - softwareCatalogTrigger + type: object SortDirection: default: desc description: The direction to sort by. @@ -32108,13 +32152,17 @@ components: - $ref: '#/components/schemas/AppTriggerWrapper' - $ref: '#/components/schemas/CaseTriggerWrapper' - $ref: '#/components/schemas/ChangeEventTriggerWrapper' + - $ref: '#/components/schemas/DatabaseMonitoringTriggerWrapper' - $ref: '#/components/schemas/DashboardTriggerWrapper' - $ref: '#/components/schemas/GithubWebhookTriggerWrapper' - $ref: '#/components/schemas/IncidentTriggerWrapper' - $ref: '#/components/schemas/MonitorTriggerWrapper' + - $ref: '#/components/schemas/NotebookTriggerWrapper' - $ref: '#/components/schemas/ScheduleTriggerWrapper' - $ref: '#/components/schemas/SecurityTriggerWrapper' + - $ref: '#/components/schemas/SelfServiceTriggerWrapper' - $ref: '#/components/schemas/SlackTriggerWrapper' + - $ref: '#/components/schemas/SoftwareCatalogTriggerWrapper' - $ref: '#/components/schemas/WorkflowTriggerWrapper' TriggerRateLimit: description: Defines a rate limit for a trigger. @@ -33743,7 +33791,7 @@ components: startStepNames: $ref: '#/components/schemas/StartStepNames' workflowTrigger: - description: Trigger a workflow VIA the Datadog UI. Only required if no + description: Trigger a workflow from the Datadog UI. Only required if no other trigger exists. type: object required: diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4a013bbc8f82..7d3c4ff9d7d0 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1518,6 +1518,7 @@ def overrides "v2.dashboard_list_update_items_response" => "DashboardListUpdateItemsResponse", "v2.dashboard_trigger_wrapper" => "DashboardTriggerWrapper", "v2.dashboard_type" => "DashboardType", + "v2.database_monitoring_trigger_wrapper" => "DatabaseMonitoringTriggerWrapper", "v2.data_deletion_response_item" => "DataDeletionResponseItem", "v2.data_deletion_response_item_attributes" => "DataDeletionResponseItemAttributes", "v2.data_deletion_response_meta" => "DataDeletionResponseMeta", @@ -2224,6 +2225,7 @@ def overrides "v2.monthly_cost_attribution_response" => "MonthlyCostAttributionResponse", "v2.ms_teams_integration_metadata" => "MSTeamsIntegrationMetadata", "v2.ms_teams_integration_metadata_teams_item" => "MSTeamsIntegrationMetadataTeamsItem", + "v2.notebook_trigger_wrapper" => "NotebookTriggerWrapper", "v2.notification_rule" => "NotificationRule", "v2.notification_rule_attributes" => "NotificationRuleAttributes", "v2.notification_rule_response" => "NotificationRuleResponse", @@ -2673,6 +2675,7 @@ def overrides "v2.security_trigger" => "SecurityTrigger", "v2.security_trigger_wrapper" => "SecurityTriggerWrapper", "v2.selectors" => "Selectors", + "v2.self_service_trigger_wrapper" => "SelfServiceTriggerWrapper", "v2.sensitive_data_scanner_config_request" => "SensitiveDataScannerConfigRequest", "v2.sensitive_data_scanner_configuration" => "SensitiveDataScannerConfiguration", "v2.sensitive_data_scanner_configuration_data" => "SensitiveDataScannerConfigurationData", @@ -2803,6 +2806,7 @@ def overrides "v2.slo_report_status_get_response" => "SLOReportStatusGetResponse", "v2.slo_report_status_get_response_attributes" => "SLOReportStatusGetResponseAttributes", "v2.slo_report_status_get_response_data" => "SLOReportStatusGetResponseData", + "v2.software_catalog_trigger_wrapper" => "SoftwareCatalogTriggerWrapper", "v2.sort_direction" => "SortDirection", "v2.span" => "Span", "v2.spans_aggregate_bucket" => "SpansAggregateBucket", diff --git a/lib/datadog_api_client/v2/models/api_trigger.rb b/lib/datadog_api_client/v2/models/api_trigger.rb index d07597181403..3b8736a622c1 100644 --- a/lib/datadog_api_client/v2/models/api_trigger.rb +++ b/lib/datadog_api_client/v2/models/api_trigger.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Trigger a workflow VIA an API. The workflow must be published. + # Trigger a workflow from an API request. The workflow must be published. class APITrigger include BaseGenericModel 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 5dd07a64fd0a..289a375844b2 100644 --- a/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class APITriggerWrapper include BaseGenericModel - # Trigger a workflow VIA an API. The workflow must be published. + # 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. 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 344c4512c230..3f590e4d6388 100644 --- a/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class AppTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA an App. + # Trigger a workflow from an App. attr_reader :app_trigger # A list of steps that run first after a trigger fires. diff --git a/lib/datadog_api_client/v2/models/case_trigger.rb b/lib/datadog_api_client/v2/models/case_trigger.rb index e1aa9de8e65b..8297096892b8 100644 --- a/lib/datadog_api_client/v2/models/case_trigger.rb +++ b/lib/datadog_api_client/v2/models/case_trigger.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Trigger a workflow VIA a Case. For automatic triggering a handle must be configured and the workflow must be published. + # Trigger a workflow from a Case. For automatic triggering a handle must be configured and the workflow must be published. class CaseTrigger include BaseGenericModel 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 14b0a77c6f16..5b8943e0d1ba 100644 --- a/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class CaseTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA a Case. For automatic triggering a handle must be configured and the workflow must be published. + # 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. 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 300b94e133f4..0bf673399a10 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 @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class ChangeEventTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA a Change Event. + # Trigger a workflow from a Change Event. attr_reader :change_event_trigger # A list of steps that run first after a trigger fires. 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 9afda106a73d..672034601fc8 100644 --- a/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class DashboardTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA a Dashboard. + # Trigger a workflow from a Dashboard. attr_reader :dashboard_trigger # A list of steps that run first after a trigger fires. 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 new file mode 100644 index 000000000000..23d13f826c2d --- /dev/null +++ b/lib/datadog_api_client/v2/models/database_monitoring_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 Database Monitoring-based trigger. + class DatabaseMonitoringTriggerWrapper + include BaseGenericModel + + # Trigger a workflow from Database Monitoring. + attr_reader :database_monitoring_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 + { + :'database_monitoring_trigger' => :'databaseMonitoringTrigger', + :'start_step_names' => :'startStepNames' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'database_monitoring_trigger' => :'Object', + :'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::DatabaseMonitoringTriggerWrapper` 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?(:'database_monitoring_trigger') + self.database_monitoring_trigger = attributes[:'database_monitoring_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 @database_monitoring_trigger.nil? + true + end + + # Custom attribute writer method with validation + # @param database_monitoring_trigger [Object] Object to be assigned + # @!visibility private + def database_monitoring_trigger=(database_monitoring_trigger) + if database_monitoring_trigger.nil? + fail ArgumentError, 'invalid value for "database_monitoring_trigger", database_monitoring_trigger cannot be nil.' + end + @database_monitoring_trigger = database_monitoring_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 && + database_monitoring_trigger == o.database_monitoring_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 + [database_monitoring_trigger, start_step_names, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/github_webhook_trigger.rb b/lib/datadog_api_client/v2/models/github_webhook_trigger.rb index 2f0348f3e641..89d520bc338e 100644 --- a/lib/datadog_api_client/v2/models/github_webhook_trigger.rb +++ b/lib/datadog_api_client/v2/models/github_webhook_trigger.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Trigger a workflow VIA 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. + # 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. class GithubWebhookTrigger include BaseGenericModel 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 88b42aa95d59..a16a258b1b39 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 @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class GithubWebhookTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA 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. + # 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. diff --git a/lib/datadog_api_client/v2/models/incident_trigger.rb b/lib/datadog_api_client/v2/models/incident_trigger.rb index 11429c14d48b..a8960e4ca6a1 100644 --- a/lib/datadog_api_client/v2/models/incident_trigger.rb +++ b/lib/datadog_api_client/v2/models/incident_trigger.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Trigger a workflow VIA an Incident. For automatic triggering a handle must be configured and the workflow must be published. + # Trigger a workflow from an Incident. For automatic triggering a handle must be configured and the workflow must be published. class IncidentTrigger include BaseGenericModel 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 f8667820d98c..1caa6638f245 100644 --- a/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class IncidentTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA an Incident. For automatic triggering a handle must be configured and the workflow must be published. + # 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. diff --git a/lib/datadog_api_client/v2/models/monitor_trigger.rb b/lib/datadog_api_client/v2/models/monitor_trigger.rb index 37980ffa2479..c9509d8827af 100644 --- a/lib/datadog_api_client/v2/models/monitor_trigger.rb +++ b/lib/datadog_api_client/v2/models/monitor_trigger.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Trigger a workflow VIA a Monitor. For automatic triggering a handle must be configured and the workflow must be published. + # Trigger a workflow from a Monitor. For automatic triggering a handle must be configured and the workflow must be published. class MonitorTrigger include BaseGenericModel 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 7775123600fb..6d8d047c0808 100644 --- a/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class MonitorTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA a Monitor. For automatic triggering a handle must be configured and the workflow must be published. + # 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. diff --git a/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb b/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb new file mode 100644 index 000000000000..739541677edd --- /dev/null +++ b/lib/datadog_api_client/v2/models/notebook_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 Notebook-based trigger. + class NotebookTriggerWrapper + include BaseGenericModel + + # Trigger a workflow from a Notebook. + attr_reader :notebook_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 + { + :'notebook_trigger' => :'notebookTrigger', + :'start_step_names' => :'startStepNames' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'notebook_trigger' => :'Object', + :'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::NotebookTriggerWrapper` 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?(:'notebook_trigger') + self.notebook_trigger = attributes[:'notebook_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 @notebook_trigger.nil? + true + end + + # Custom attribute writer method with validation + # @param notebook_trigger [Object] Object to be assigned + # @!visibility private + def notebook_trigger=(notebook_trigger) + if notebook_trigger.nil? + fail ArgumentError, 'invalid value for "notebook_trigger", notebook_trigger cannot be nil.' + end + @notebook_trigger = notebook_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 && + notebook_trigger == o.notebook_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 + [notebook_trigger, start_step_names, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/schedule_trigger.rb b/lib/datadog_api_client/v2/models/schedule_trigger.rb index 92eca72bca33..2aa9dc400f27 100644 --- a/lib/datadog_api_client/v2/models/schedule_trigger.rb +++ b/lib/datadog_api_client/v2/models/schedule_trigger.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Trigger a workflow VIA a Schedule. The workflow must be published. + # Trigger a workflow from a Schedule. The workflow must be published. class ScheduleTrigger include BaseGenericModel 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 db3d6b7efda3..64a76f25c2b4 100644 --- a/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class ScheduleTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA a Schedule. The workflow must be published. + # 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. diff --git a/lib/datadog_api_client/v2/models/security_trigger.rb b/lib/datadog_api_client/v2/models/security_trigger.rb index 4ebd64c799f0..b159523ca01e 100644 --- a/lib/datadog_api_client/v2/models/security_trigger.rb +++ b/lib/datadog_api_client/v2/models/security_trigger.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Trigger a workflow VIA a Security Signal or Finding. For automatic triggering a handle must be configured and the workflow must be published. + # Trigger a workflow from a Security Signal or Finding. For automatic triggering a handle must be configured and the workflow must be published. class SecurityTrigger include BaseGenericModel 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 072599e569fa..7c5e0bfcd627 100644 --- a/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class SecurityTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA a Security Signal or Finding. For automatic triggering a handle must be configured and the workflow must be published. + # 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. 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 new file mode 100644 index 000000000000..66facb3dc65e --- /dev/null +++ b/lib/datadog_api_client/v2/models/self_service_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 Self Service-based trigger. + class SelfServiceTriggerWrapper + include BaseGenericModel + + # Trigger a workflow from Self Service. + attr_reader :self_service_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 + { + :'self_service_trigger' => :'selfServiceTrigger', + :'start_step_names' => :'startStepNames' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'self_service_trigger' => :'Object', + :'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::SelfServiceTriggerWrapper` 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?(:'self_service_trigger') + self.self_service_trigger = attributes[:'self_service_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 @self_service_trigger.nil? + true + end + + # Custom attribute writer method with validation + # @param self_service_trigger [Object] Object to be assigned + # @!visibility private + def self_service_trigger=(self_service_trigger) + if self_service_trigger.nil? + fail ArgumentError, 'invalid value for "self_service_trigger", self_service_trigger cannot be nil.' + end + @self_service_trigger = self_service_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 && + self_service_trigger == o.self_service_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 + [self_service_trigger, start_step_names, additional_properties].hash + end + end +end 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 5e5ede477059..414349de8de3 100644 --- a/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class SlackTriggerWrapper include BaseGenericModel - # Trigger a workflow VIA Slack. The workflow must be published. + # 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. 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 new file mode 100644 index 000000000000..f863c8aa47b4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/software_catalog_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 Software Catalog-based trigger. + class SoftwareCatalogTriggerWrapper + include BaseGenericModel + + # Trigger a workflow from Software Catalog. + attr_reader :software_catalog_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 + { + :'software_catalog_trigger' => :'softwareCatalogTrigger', + :'start_step_names' => :'startStepNames' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'software_catalog_trigger' => :'Object', + :'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::SoftwareCatalogTriggerWrapper` 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?(:'software_catalog_trigger') + self.software_catalog_trigger = attributes[:'software_catalog_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 @software_catalog_trigger.nil? + true + end + + # Custom attribute writer method with validation + # @param software_catalog_trigger [Object] Object to be assigned + # @!visibility private + def software_catalog_trigger=(software_catalog_trigger) + if software_catalog_trigger.nil? + fail ArgumentError, 'invalid value for "software_catalog_trigger", software_catalog_trigger cannot be nil.' + end + @software_catalog_trigger = software_catalog_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 && + software_catalog_trigger == o.software_catalog_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 + [software_catalog_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 ffa8d74e8079..01a0e0a88de7 100644 --- a/lib/datadog_api_client/v2/models/trigger.rb +++ b/lib/datadog_api_client/v2/models/trigger.rb @@ -30,13 +30,17 @@ def openapi_one_of :'AppTriggerWrapper', :'CaseTriggerWrapper', :'ChangeEventTriggerWrapper', + :'DatabaseMonitoringTriggerWrapper', :'DashboardTriggerWrapper', :'GithubWebhookTriggerWrapper', :'IncidentTriggerWrapper', :'MonitorTriggerWrapper', + :'NotebookTriggerWrapper', :'ScheduleTriggerWrapper', :'SecurityTriggerWrapper', + :'SelfServiceTriggerWrapper', :'SlackTriggerWrapper', + :'SoftwareCatalogTriggerWrapper', :'WorkflowTriggerWrapper' ] end 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 ff9203fba10a..986f09d8a3f8 100644 --- a/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb +++ b/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb @@ -24,7 +24,7 @@ class WorkflowTriggerWrapper # A list of steps that run first after a trigger fires. attr_accessor :start_step_names - # Trigger a workflow VIA the Datadog UI. Only required if no other trigger exists. + # Trigger a workflow from the Datadog UI. Only required if no other trigger exists. attr_reader :workflow_trigger attr_accessor :additional_properties