From 5fd62a4514feda4169fd506c9e9e46b8941cd34a Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 13:41:38 +0000 Subject: [PATCH 1/3] Regenerate client from commit bb4e49d of spec repo (#3443) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 52 +++++++ lib/datadog_api_client/inflector.rb | 2 + .../v2/models/issue_case_attributes.rb | 12 +- .../v2/models/issue_case_jira_issue.rb | 12 +- .../v2/models/issue_case_jira_issue_result.rb | 22 ++- .../v2/models/issue_case_linear_issue.rb | 125 +++++++++++++++ .../models/issue_case_linear_issue_result.rb | 145 ++++++++++++++++++ 7 files changed, 367 insertions(+), 3 deletions(-) create mode 100644 lib/datadog_api_client/v2/models/issue_case_linear_issue.rb create mode 100644 lib/datadog_api_client/v2/models/issue_case_linear_issue_result.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f581e14626df..6fb49c2d3a1f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -44193,6 +44193,8 @@ components: description: Key of the case. example: "ET-123" type: string + linear_issue: + $ref: "#/components/schemas/IssueCaseLinearIssue" modified_at: description: Timestamp of when the case was last modified. example: "2025-01-01T00:00:00Z" @@ -44230,6 +44232,10 @@ components: IssueCaseJiraIssue: description: Jira issue of the case. properties: + error_message: + description: Error message set when the Jira issue creation fails. + example: "" + type: string result: $ref: "#/components/schemas/IssueCaseJiraIssueResult" status: @@ -44240,6 +44246,10 @@ components: IssueCaseJiraIssueResult: description: Contains the identifiers and URL for a successfully created Jira issue. properties: + account_id: + description: Jira account identifier. + example: "abcd1234-5678-90ab-cdef-1234567890ab" + type: string issue_id: description: Jira issue identifier. example: "1904866" @@ -44252,11 +44262,53 @@ components: description: Jira issue URL. example: "https://your-jira-instance.atlassian.net/browse/ET-123" type: string + project_id: + description: Jira project identifier. + example: "10001" + type: string project_key: description: Jira project key. example: "ET" type: string type: object + IssueCaseLinearIssue: + description: Linear issue of the case. + properties: + error_message: + description: Error message set when the Linear issue creation fails. + example: "" + type: string + result: + $ref: "#/components/schemas/IssueCaseLinearIssueResult" + status: + description: Creation status of the Linear issue. + example: "COMPLETED" + type: string + type: object + IssueCaseLinearIssueResult: + description: Contains the identifiers and URL for a successfully created Linear issue. + properties: + account_id: + description: Linear account identifier. + example: "abcd1234-5678-90ab-cdef-1234567890ab" + type: string + issue_id: + description: Linear issue identifier. + example: "a1b2c3d4-5678-90ab-cdef-1234567890ab" + type: string + issue_key: + description: Linear issue key. + example: "ENG-123" + type: string + issue_url: + description: Linear issue URL. + example: "https://linear.app/your-workspace/issue/ENG-123" + type: string + team_id: + description: Linear team identifier. + example: "f1e2d3c4-5678-90ab-cdef-1234567890ab" + type: string + type: object IssueCaseReference: description: The case the issue is attached to. properties: diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 7e3ed18cdf77..8f9603ede64d 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3708,6 +3708,8 @@ def overrides "v2.issue_case_insight" => "IssueCaseInsight", "v2.issue_case_jira_issue" => "IssueCaseJiraIssue", "v2.issue_case_jira_issue_result" => "IssueCaseJiraIssueResult", + "v2.issue_case_linear_issue" => "IssueCaseLinearIssue", + "v2.issue_case_linear_issue_result" => "IssueCaseLinearIssueResult", "v2.issue_case_reference" => "IssueCaseReference", "v2.issue_case_relationship" => "IssueCaseRelationship", "v2.issue_case_relationships" => "IssueCaseRelationships", diff --git a/lib/datadog_api_client/v2/models/issue_case_attributes.rb b/lib/datadog_api_client/v2/models/issue_case_attributes.rb index 80daf998d465..d300efae485c 100644 --- a/lib/datadog_api_client/v2/models/issue_case_attributes.rb +++ b/lib/datadog_api_client/v2/models/issue_case_attributes.rb @@ -48,6 +48,9 @@ class IssueCaseAttributes # Key of the case. attr_accessor :key + # Linear issue of the case. + attr_accessor :linear_issue + # Timestamp of when the case was last modified. attr_accessor :modified_at @@ -78,6 +81,7 @@ def self.attribute_map :'insights' => :'insights', :'jira_issue' => :'jira_issue', :'key' => :'key', + :'linear_issue' => :'linear_issue', :'modified_at' => :'modified_at', :'priority' => :'priority', :'status' => :'status', @@ -99,6 +103,7 @@ def self.openapi_types :'insights' => :'Array', :'jira_issue' => :'IssueCaseJiraIssue', :'key' => :'String', + :'linear_issue' => :'IssueCaseLinearIssue', :'modified_at' => :'Time', :'priority' => :'CasePriority', :'status' => :'CaseStatus', @@ -163,6 +168,10 @@ def initialize(attributes = {}) self.key = attributes[:'key'] end + if attributes.key?(:'linear_issue') + self.linear_issue = attributes[:'linear_issue'] + end + if attributes.key?(:'modified_at') self.modified_at = attributes[:'modified_at'] end @@ -219,6 +228,7 @@ def ==(o) insights == o.insights && jira_issue == o.jira_issue && key == o.key && + linear_issue == o.linear_issue && modified_at == o.modified_at && priority == o.priority && status == o.status && @@ -231,7 +241,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [archived_at, closed_at, created_at, creation_source, description, due_date, insights, jira_issue, key, modified_at, priority, status, title, type, additional_properties].hash + [archived_at, closed_at, created_at, creation_source, description, due_date, insights, jira_issue, key, linear_issue, modified_at, priority, status, title, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/issue_case_jira_issue.rb b/lib/datadog_api_client/v2/models/issue_case_jira_issue.rb index 627029abccda..5bf9e5fbb195 100644 --- a/lib/datadog_api_client/v2/models/issue_case_jira_issue.rb +++ b/lib/datadog_api_client/v2/models/issue_case_jira_issue.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class IssueCaseJiraIssue include BaseGenericModel + # Error message set when the Jira issue creation fails. + attr_accessor :error_message + # Contains the identifiers and URL for a successfully created Jira issue. attr_accessor :result @@ -33,6 +36,7 @@ class IssueCaseJiraIssue # @!visibility private def self.attribute_map { + :'error_message' => :'error_message', :'result' => :'result', :'status' => :'status' } @@ -42,6 +46,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'error_message' => :'String', :'result' => :'IssueCaseJiraIssueResult', :'status' => :'String' } @@ -65,6 +70,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + if attributes.key?(:'result') self.result = attributes[:'result'] end @@ -100,6 +109,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + error_message == o.error_message && result == o.result && status == o.status && additional_properties == o.additional_properties @@ -109,7 +119,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [result, status, additional_properties].hash + [error_message, result, status, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/issue_case_jira_issue_result.rb b/lib/datadog_api_client/v2/models/issue_case_jira_issue_result.rb index 6d5d4ac3069e..021ec53bafc4 100644 --- a/lib/datadog_api_client/v2/models/issue_case_jira_issue_result.rb +++ b/lib/datadog_api_client/v2/models/issue_case_jira_issue_result.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class IssueCaseJiraIssueResult include BaseGenericModel + # Jira account identifier. + attr_accessor :account_id + # Jira issue identifier. attr_accessor :issue_id @@ -30,6 +33,9 @@ class IssueCaseJiraIssueResult # Jira issue URL. attr_accessor :issue_url + # Jira project identifier. + attr_accessor :project_id + # Jira project key. attr_accessor :project_key @@ -39,9 +45,11 @@ class IssueCaseJiraIssueResult # @!visibility private def self.attribute_map { + :'account_id' => :'account_id', :'issue_id' => :'issue_id', :'issue_key' => :'issue_key', :'issue_url' => :'issue_url', + :'project_id' => :'project_id', :'project_key' => :'project_key' } end @@ -50,9 +58,11 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'account_id' => :'String', :'issue_id' => :'String', :'issue_key' => :'String', :'issue_url' => :'String', + :'project_id' => :'String', :'project_key' => :'String' } end @@ -75,6 +85,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + if attributes.key?(:'issue_id') self.issue_id = attributes[:'issue_id'] end @@ -87,6 +101,10 @@ def initialize(attributes = {}) self.issue_url = attributes[:'issue_url'] end + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + if attributes.key?(:'project_key') self.project_key = attributes[:'project_key'] end @@ -118,9 +136,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + account_id == o.account_id && issue_id == o.issue_id && issue_key == o.issue_key && issue_url == o.issue_url && + project_id == o.project_id && project_key == o.project_key && additional_properties == o.additional_properties end @@ -129,7 +149,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [issue_id, issue_key, issue_url, project_key, additional_properties].hash + [account_id, issue_id, issue_key, issue_url, project_id, project_key, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/issue_case_linear_issue.rb b/lib/datadog_api_client/v2/models/issue_case_linear_issue.rb new file mode 100644 index 000000000000..bc3d46c0ee4e --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_case_linear_issue.rb @@ -0,0 +1,125 @@ +=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 + # Linear issue of the case. + class IssueCaseLinearIssue + include BaseGenericModel + + # Error message set when the Linear issue creation fails. + attr_accessor :error_message + + # Contains the identifiers and URL for a successfully created Linear issue. + attr_accessor :result + + # Creation status of the Linear issue. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'error_message' => :'error_message', + :'result' => :'result', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'error_message' => :'String', + :'result' => :'IssueCaseLinearIssueResult', + :'status' => :'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::IssueCaseLinearIssue` 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?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'result') + self.result = attributes[:'result'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + 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 && + error_message == o.error_message && + result == o.result && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [error_message, result, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/issue_case_linear_issue_result.rb b/lib/datadog_api_client/v2/models/issue_case_linear_issue_result.rb new file mode 100644 index 000000000000..40fa101bdd29 --- /dev/null +++ b/lib/datadog_api_client/v2/models/issue_case_linear_issue_result.rb @@ -0,0 +1,145 @@ +=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 + # Contains the identifiers and URL for a successfully created Linear issue. + class IssueCaseLinearIssueResult + include BaseGenericModel + + # Linear account identifier. + attr_accessor :account_id + + # Linear issue identifier. + attr_accessor :issue_id + + # Linear issue key. + attr_accessor :issue_key + + # Linear issue URL. + attr_accessor :issue_url + + # Linear team identifier. + attr_accessor :team_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'issue_id' => :'issue_id', + :'issue_key' => :'issue_key', + :'issue_url' => :'issue_url', + :'team_id' => :'team_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'issue_id' => :'String', + :'issue_key' => :'String', + :'issue_url' => :'String', + :'team_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::IssueCaseLinearIssueResult` 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?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + end + + if attributes.key?(:'issue_key') + self.issue_key = attributes[:'issue_key'] + end + + if attributes.key?(:'issue_url') + self.issue_url = attributes[:'issue_url'] + end + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_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 && + account_id == o.account_id && + issue_id == o.issue_id && + issue_key == o.issue_key && + issue_url == o.issue_url && + team_id == o.team_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, issue_id, issue_key, issue_url, team_id, additional_properties].hash + end + end +end From a3b429a93a12a86c89fa217db42ef993e954cb77 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 15:30:10 +0000 Subject: [PATCH 2/3] Regenerate client from commit e65553f of spec repo (#3450) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v1/openapi.yaml | 2 +- .generator/schemas/v2/openapi.yaml | 129 +++++++++++------- .../v2/api/usage_metering_api.rb | 2 +- 3 files changed, 81 insertions(+), 52 deletions(-) diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 7023d0d7bb93..82c52ea77c72 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -43428,7 +43428,7 @@ paths: operator: OR permissions: - user_access_invite - "/api/v1/user/{user_handle}": + /api/v1/user/{user_handle}: delete: description: |- Delete a user from an organization. diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6fb49c2d3a1f..0e2a1dacf1e6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -64631,7 +64631,8 @@ components: OrgConfigGetResponse: description: A response with a single Org Config. properties: - data: {$ref: "#/components/schemas/OrgConfigRead"} + data: + $ref: "#/components/schemas/OrgConfigRead" required: [data] type: object OrgConfigListResponse: @@ -64639,19 +64640,22 @@ components: properties: data: description: An array of Org Configs. - items: {$ref: "#/components/schemas/OrgConfigRead"} + items: + $ref: "#/components/schemas/OrgConfigRead" type: array required: [data] type: object OrgConfigRead: description: A single Org Config. properties: - attributes: {$ref: "#/components/schemas/OrgConfigReadAttributes"} + attributes: + $ref: "#/components/schemas/OrgConfigReadAttributes" id: description: A unique identifier for an Org Config. example: abcd1234 type: string - type: {$ref: "#/components/schemas/OrgConfigType"} + type: + $ref: "#/components/schemas/OrgConfigType" required: [id, type, attributes] type: object OrgConfigReadAttributes: @@ -64688,8 +64692,10 @@ components: OrgConfigWrite: description: An Org Config write operation. properties: - attributes: {$ref: "#/components/schemas/OrgConfigWriteAttributes"} - type: {$ref: "#/components/schemas/OrgConfigType"} + attributes: + $ref: "#/components/schemas/OrgConfigWriteAttributes" + type: + $ref: "#/components/schemas/OrgConfigType" required: [type, attributes] type: object OrgConfigWriteAttributes: @@ -64702,7 +64708,8 @@ components: OrgConfigWriteRequest: description: A request to update an Org Config. properties: - data: {$ref: "#/components/schemas/OrgConfigWrite"} + data: + $ref: "#/components/schemas/OrgConfigWrite" required: [data] type: object OrgConnection: @@ -102560,7 +102567,7 @@ paths: operator: OR permissions: - apps_datastore_manage - "/api/v2/actions-datastores/{datastore_id}": + /api/v2/actions-datastores/{datastore_id}: delete: description: Deletes a datastore by its unique identifier. operationId: DeleteDatastore @@ -102704,7 +102711,7 @@ paths: operator: OR permissions: - apps_datastore_manage - "/api/v2/actions-datastores/{datastore_id}/items": + /api/v2/actions-datastores/{datastore_id}/items: delete: description: Deletes an item from a datastore by its key. operationId: DeleteDatastoreItem @@ -102916,7 +102923,7 @@ paths: operator: OR permissions: - apps_datastore_write - "/api/v2/actions-datastores/{datastore_id}/items/bulk": + /api/v2/actions-datastores/{datastore_id}/items/bulk: delete: description: >- Deletes multiple items from a datastore by their keys in a single operation. @@ -105936,7 +105943,7 @@ paths: - apps_write - connections_resolve - workflows_run - "/api/v2/app-builder/apps/{app_id}": + /api/v2/app-builder/apps/{app_id}: delete: description: Delete a single app. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). operationId: DeleteApp @@ -106138,7 +106145,7 @@ paths: - apps_write - connections_resolve - workflows_run - "/api/v2/app-builder/apps/{app_id}/deployment": + /api/v2/app-builder/apps/{app_id}/deployment: delete: description: Unpublish an app, removing the live version of the app. Unpublishing creates a new instance of a `deployment` object on the app, with a nil `app_version_id` (`00000000-0000-0000-0000-000000000000`). The app can still be updated and published again in the future. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). operationId: UnpublishApp @@ -106247,7 +106254,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/favorite": + /api/v2/app-builder/apps/{app_id}/favorite: patch: description: Add or remove an app from the current user's favorites. Favorited apps can be filtered for using the `filter[favorite]` query parameter on the [List Apps](https://docs.datadoghq.com/api/latest/app-builder/#list-apps) endpoint. operationId: UpdateAppFavorite @@ -106303,7 +106310,7 @@ paths: operator: OR permissions: - apps_run - "/api/v2/app-builder/apps/{app_id}/protection-level": + /api/v2/app-builder/apps/{app_id}/protection-level: patch: description: Update the publication protection level of an app. When set to `approval_required`, future publishes must go through an approval workflow before going live. operationId: UpdateProtectionLevel @@ -106377,7 +106384,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/publish-request": + /api/v2/app-builder/apps/{app_id}/publish-request: post: description: Create a publish request to ask for approval to publish an app whose protection level is `approval_required`. Publishing happens automatically once the request is approved by a user with the appropriate permissions. operationId: CreatePublishRequest @@ -106450,7 +106457,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/revert": + /api/v2/app-builder/apps/{app_id}/revert: post: description: Revert an app to a previous version. The version to revert to is selected through the `version` query parameter. The reverted version becomes the new latest version of the app. operationId: RevertApp @@ -106518,7 +106525,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/self-service": + /api/v2/app-builder/apps/{app_id}/self-service: patch: description: Enable or disable self-service for an app. Self-service apps can be discovered and run by users in your organization without explicit access being granted. operationId: UpdateAppSelfService @@ -106574,7 +106581,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/tags": + /api/v2/app-builder/apps/{app_id}/tags: patch: description: Replace the tags on an app. The provided list overwrites the existing tags entirely; tags not present in the request body are removed. operationId: UpdateAppTags @@ -106632,7 +106639,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/version-name": + /api/v2/app-builder/apps/{app_id}/version-name: patch: description: Assign a human-readable name to a specific version of an app. The version is selected through the `version` query parameter. operationId: UpdateAppVersionName @@ -106695,7 +106702,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/versions": + /api/v2/app-builder/apps/{app_id}/versions: get: description: List the versions of an app. This endpoint is paginated. operationId: ListAppVersions @@ -106775,7 +106782,7 @@ paths: permissions: - apps_run - connections_read - "/api/v2/app-builder/blueprint/{blueprint_id}": + /api/v2/app-builder/blueprint/{blueprint_id}: get: description: Retrieve an app blueprint by its ID. operationId: GetBlueprint @@ -106888,7 +106895,7 @@ paths: - apps_write - connections_read - connections_write - "/api/v2/app-builder/blueprints/integration-id/{integration_id}": + /api/v2/app-builder/blueprints/integration-id/{integration_id}: get: description: List app blueprints associated with a specific integration ID. operationId: GetBlueprintsByIntegrationId @@ -106939,7 +106946,7 @@ paths: - apps_write - connections_read - connections_write - "/api/v2/app-builder/blueprints/slugs/{slugs}": + /api/v2/app-builder/blueprints/slugs/{slugs}: get: description: Retrieve app blueprints by their slugs. operationId: GetBlueprintsBySlugs @@ -144794,12 +144801,17 @@ paths: value_type: bool id: abcd1234 type: org_configs - schema: {$ref: "#/components/schemas/OrgConfigListResponse"} + schema: + $ref: "#/components/schemas/OrgConfigListResponse" description: OK - "400": {$ref: "#/components/responses/BadRequestResponse"} - "401": {$ref: "#/components/responses/UnauthorizedResponse"} - "403": {$ref: "#/components/responses/ForbiddenResponse"} - "429": {$ref: "#/components/responses/TooManyRequestsResponse"} + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" summary: List Org Configs tags: [Organizations] "x-permission": @@ -144809,7 +144821,8 @@ paths: get: description: Return the name, description, and value of a specific Org Config. operationId: GetOrgConfig - parameters: [$ref: "#/components/parameters/OrgConfigName"] + parameters: + - $ref: "#/components/parameters/OrgConfigName" responses: "200": content: @@ -144825,13 +144838,19 @@ paths: value_type: bool id: abcd1234 type: org_configs - schema: {$ref: "#/components/schemas/OrgConfigGetResponse"} + schema: + $ref: "#/components/schemas/OrgConfigGetResponse" description: OK - "400": {$ref: "#/components/responses/BadRequestResponse"} - "401": {$ref: "#/components/responses/UnauthorizedResponse"} - "403": {$ref: "#/components/responses/ForbiddenResponse"} - "404": {$ref: "#/components/responses/NotFoundResponse"} - "429": {$ref: "#/components/responses/TooManyRequestsResponse"} + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" summary: Get a specific Org Config value tags: [Organizations] "x-permission": @@ -144840,7 +144859,8 @@ paths: patch: description: Update the value of a specific Org Config. operationId: UpdateOrgConfig - parameters: [$ref: "#/components/parameters/OrgConfigName"] + parameters: + - $ref: "#/components/parameters/OrgConfigName" requestBody: content: application/json: @@ -144851,7 +144871,8 @@ paths: attributes: value: UTC type: org_configs - schema: {$ref: "#/components/schemas/OrgConfigWriteRequest"} + schema: + $ref: "#/components/schemas/OrgConfigWriteRequest" required: true responses: "200": @@ -144868,13 +144889,19 @@ paths: value_type: bool id: abcd1234 type: org_configs - schema: {$ref: "#/components/schemas/OrgConfigGetResponse"} + schema: + $ref: "#/components/schemas/OrgConfigGetResponse" description: OK - "400": {$ref: "#/components/responses/BadRequestResponse"} - "401": {$ref: "#/components/responses/UnauthorizedResponse"} - "403": {$ref: "#/components/responses/ForbiddenResponse"} - "404": {$ref: "#/components/responses/NotFoundResponse"} - "429": {$ref: "#/components/responses/TooManyRequestsResponse"} + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" summary: Update a specific Org Config tags: [Organizations] "x-permission": @@ -175728,13 +175755,15 @@ paths: format: date-time type: string - description: |- - Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, - `application_security`, `audit_trail`, `bits_ai`, `serverless`, `ci_app`, `cloud_cost_management`, `cloud_siem`, - `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, `cws`, `dbm`, `error_tracking`, - `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, - `lambda_traced_invocations`, `llm_observability`, `logs`, `network_flows`, `network_hosts`, `network_monitoring`, - `observability_pipelines`, `online_archive`, `profiling`, `product_analytics`, `rum`, `rum_browser_sessions`, - `rum_mobile_sessions`, `sds`, `snmp`, `software_delivery`, `synthetics_api`, `synthetics_browser`, + Comma separated list of product families to retrieve. Available families are `all`, `ai`, `analyzed_logs`, + `application_performance_monitoring`, `application_security`, `audit_trail`, `bits_ai`, `serverless`, `ci_app`, + `cloud_cost_management`, `cloud_siem`, `csm_container_enterprise`, `csm_host_enterprise`, `csm_host_pro`, `cspm`, + `custom_events`, `cws`, `data_observability`, `dbm`, `digital_experience_management`, `error_tracking`, + `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `infrastructure_monitoring`, + `ingested_spans`, `iot`, `lambda_traced_invocations`, `llm_observability`, `log_management`, `logs`, + `network_flows`, `network_hosts`, `network_monitoring`, `observability_pipelines`, `online_archive`, + `platform_capabilities`, `product_analytics`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, + `sds`, `security`, `snmp`, `software_delivery`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, `timeseries`, `vuln_management` and `workflow_executions`. The following product family has been **deprecated**: `audit_logs`. in: query diff --git a/lib/datadog_api_client/v2/api/usage_metering_api.rb b/lib/datadog_api_client/v2/api/usage_metering_api.rb index 3e81e06d1b6b..94451939e219 100644 --- a/lib/datadog_api_client/v2/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v2/api/usage_metering_api.rb @@ -398,7 +398,7 @@ def get_hourly_usage(filter_timestamp_start, filter_product_families, opts = {}) # Get hourly usage by product family. # # @param filter_timestamp_start [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - # @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `bits_ai`, `serverless`, `ci_app`, `cloud_cost_management`, `cloud_siem`, `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, `cws`, `dbm`, `error_tracking`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `llm_observability`, `logs`, `network_flows`, `network_hosts`, `network_monitoring`, `observability_pipelines`, `online_archive`, `profiling`, `product_analytics`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `software_delivery`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, `timeseries`, `vuln_management` and `workflow_executions`. The following product family has been **deprecated**: `audit_logs`. + # @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `ai`, `analyzed_logs`, `application_performance_monitoring`, `application_security`, `audit_trail`, `bits_ai`, `serverless`, `ci_app`, `cloud_cost_management`, `cloud_siem`, `csm_container_enterprise`, `csm_host_enterprise`, `csm_host_pro`, `cspm`, `custom_events`, `cws`, `data_observability`, `dbm`, `digital_experience_management`, `error_tracking`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `infrastructure_monitoring`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `llm_observability`, `log_management`, `logs`, `network_flows`, `network_hosts`, `network_monitoring`, `observability_pipelines`, `online_archive`, `platform_capabilities`, `product_analytics`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `security`, `snmp`, `software_delivery`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, `timeseries`, `vuln_management` and `workflow_executions`. The following product family has been **deprecated**: `audit_logs`. # @param opts [Hash] the optional parameters # @option opts [Time] :filter_timestamp_end Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. # @option opts [Boolean] :filter_include_descendants Include child org usage in the response. Defaults to false. From f7ade6651986b89dc79b11c0b94914bbab230c0a Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:10:30 +0000 Subject: [PATCH 3/3] Regenerate client from commit 16c4984 of spec repo (#3436) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 87 +++++++++ ...ell-known-sites-returns-OK-response.frozen | 1 + ...2-well-known-sites-returns-OK-response.yml | 20 +++ lib/datadog_api_client/configuration.rb | 1 + lib/datadog_api_client/inflector.rb | 4 + .../v2/api/o_auth2_client_public_api.rb | 66 +++++++ .../o_auth2_well_known_sites_attributes.rb | 125 +++++++++++++ .../models/o_auth2_well_known_sites_data.rb | 165 ++++++++++++++++++ .../o_auth2_well_known_sites_env_type.rb | 26 +++ .../o_auth2_well_known_sites_response.rb | 123 +++++++++++++ 10 files changed, 618 insertions(+) create mode 100644 cassettes/features/v2/oauth2_client_public/Get-OAuth2-well-known-sites-returns-OK-response.frozen create mode 100644 cassettes/features/v2/oauth2_client_public/Get-OAuth2-well-known-sites-returns-OK-response.yml create mode 100644 lib/datadog_api_client/v2/models/o_auth2_well_known_sites_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth2_well_known_sites_data.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth2_well_known_sites_env_type.rb create mode 100644 lib/datadog_api_client/v2/models/o_auth2_well_known_sites_response.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0e2a1dacf1e6..cf112d7eaa44 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -57840,6 +57840,59 @@ components: - id - type type: object + OAuth2WellKnownSitesAttributes: + description: Attributes containing the list of public OAuth2 sites. + properties: + sites: + description: Array of public OAuth2 site URLs for the environment. + example: + - datadoghq.com + - datadoghq.eu + - us5.datadoghq.com + - us3.datadoghq.com + - ap1.datadoghq.com + - ap2.datadoghq.com + items: + description: Public OAuth2 site URL. + example: app.datadoghq.com + type: string + type: array + required: + - sites + type: object + OAuth2WellKnownSitesData: + description: Data object containing OAuth2 well-known sites information. + properties: + attributes: + $ref: "#/components/schemas/OAuth2WellKnownSitesAttributes" + id: + description: Environment identifier. + example: prod + type: string + type: + $ref: "#/components/schemas/OAuth2WellKnownSitesEnvType" + required: + - id + - type + - attributes + type: object + OAuth2WellKnownSitesEnvType: + default: env + description: JSON:API resource type for OAuth2 well-known sites environment. + enum: + - env + example: env + type: string + x-enum-varnames: + - ENV + OAuth2WellKnownSitesResponse: + description: Response payload containing the list of public OAuth2 sites for discovery. + properties: + data: + $ref: "#/components/schemas/OAuth2WellKnownSitesData" + required: + - data + type: object OAuthClientRegistrationError: description: Error payload returned by OAuth2 dynamic client registration as defined by RFC 7591. properties: @@ -142472,6 +142525,40 @@ paths: summary: Get all aggregated DNS traffic tags: - Cloud Network Monitoring + /api/v2/oauth2/.well-known/sites: + get: + description: Retrieve the list of public OAuth2 sites available for the current environment. This endpoint is used for OAuth2 discovery and returns sites where users can authenticate. + operationId: GetOAuth2WellKnownSites + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + sites: + - datadoghq.com + - datadoghq.eu + - us5.datadoghq.com + - us3.datadoghq.com + - ap1.datadoghq.com + - ap2.datadoghq.com + id: prod + type: env + schema: + $ref: "#/components/schemas/OAuth2WellKnownSitesResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: [] + summary: Get OAuth2 well-known sites + tags: + - OAuth2 Client Public + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/oauth2/clients/{client_uuid}/scopes_restriction: delete: description: Delete the scopes restriction configured for the OAuth2 client. diff --git a/cassettes/features/v2/oauth2_client_public/Get-OAuth2-well-known-sites-returns-OK-response.frozen b/cassettes/features/v2/oauth2_client_public/Get-OAuth2-well-known-sites-returns-OK-response.frozen new file mode 100644 index 000000000000..64ca8409fa57 --- /dev/null +++ b/cassettes/features/v2/oauth2_client_public/Get-OAuth2-well-known-sites-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-06-02T09:00:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/oauth2_client_public/Get-OAuth2-well-known-sites-returns-OK-response.yml b/cassettes/features/v2/oauth2_client_public/Get-OAuth2-well-known-sites-returns-OK-response.yml new file mode 100644 index 000000000000..62da44a039d9 --- /dev/null +++ b/cassettes/features/v2/oauth2_client_public/Get-OAuth2-well-known-sites-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Tue, 02 Jun 2026 09:00:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/oauth2/.well-known/sites + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"prod","type":"env","attributes":{"sites":["app.datadoghq.com","app.datadoghq.eu","us5.datadoghq.com","us3.datadoghq.com","ap1.datadoghq.com"]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index a6c3dd69f153..e72c6648bef5 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -536,6 +536,7 @@ def initialize "v2.validate_existing_monitor_user_template": false, "v2.validate_monitor_user_template": false, "v2.delete_scopes_restriction": false, + "v2.get_o_auth2_well_known_sites": false, "v2.get_scopes_restriction": false, "v2.register_o_auth_client": false, "v2.upsert_scopes_restriction": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 8f9603ede64d..b7831f1e2f41 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4590,6 +4590,10 @@ def overrides "v2.nullable_relationship_to_user_data" => "NullableRelationshipToUserData", "v2.nullable_user_relationship" => "NullableUserRelationship", "v2.nullable_user_relationship_data" => "NullableUserRelationshipData", + "v2.o_auth2_well_known_sites_attributes" => "OAuth2WellKnownSitesAttributes", + "v2.o_auth2_well_known_sites_data" => "OAuth2WellKnownSitesData", + "v2.o_auth2_well_known_sites_env_type" => "OAuth2WellKnownSitesEnvType", + "v2.o_auth2_well_known_sites_response" => "OAuth2WellKnownSitesResponse", "v2.o_auth_client_registration_error" => "OAuthClientRegistrationError", "v2.o_auth_client_registration_grant_type" => "OAuthClientRegistrationGrantType", "v2.o_auth_client_registration_request" => "OAuthClientRegistrationRequest", diff --git a/lib/datadog_api_client/v2/api/o_auth2_client_public_api.rb b/lib/datadog_api_client/v2/api/o_auth2_client_public_api.rb index 1264fef6c088..830e0ef2be53 100644 --- a/lib/datadog_api_client/v2/api/o_auth2_client_public_api.rb +++ b/lib/datadog_api_client/v2/api/o_auth2_client_public_api.rb @@ -94,6 +94,72 @@ def delete_scopes_restriction_with_http_info(client_uuid, opts = {}) return data, status_code, headers end + # Get OAuth2 well-known sites. + # + # @see #get_o_auth2_well_known_sites_with_http_info + def get_o_auth2_well_known_sites(opts = {}) + data, _status_code, _headers = get_o_auth2_well_known_sites_with_http_info(opts) + data + end + + # Get OAuth2 well-known sites. + # + # Retrieve the list of public OAuth2 sites available for the current environment. This endpoint is used for OAuth2 discovery and returns sites where users can authenticate. + # + # @param opts [Hash] the optional parameters + # @return [Array<(OAuth2WellKnownSitesResponse, Integer, Hash)>] OAuth2WellKnownSitesResponse data, response status code and response headers + def get_o_auth2_well_known_sites_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_o_auth2_well_known_sites".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_o_auth2_well_known_sites") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_o_auth2_well_known_sites")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2ClientPublicAPI.get_o_auth2_well_known_sites ...' + end + # resource path + local_var_path = '/api/v2/oauth2/.well-known/sites' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2WellKnownSitesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :get_o_auth2_well_known_sites, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2ClientPublicAPI#get_o_auth2_well_known_sites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get an OAuth2 client scopes restriction. # # @see #get_scopes_restriction_with_http_info diff --git a/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_attributes.rb b/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_attributes.rb new file mode 100644 index 000000000000..e9be0eb68c74 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_attributes.rb @@ -0,0 +1,125 @@ +=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 + # Attributes containing the list of public OAuth2 sites. + class OAuth2WellKnownSitesAttributes + include BaseGenericModel + + # Array of public OAuth2 site URLs for the environment. + attr_reader :sites + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'sites' => :'sites' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'sites' => :'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::OAuth2WellKnownSitesAttributes` 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?(:'sites') + if (value = attributes[:'sites']).is_a?(Array) + self.sites = 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 @sites.nil? + true + end + + # Custom attribute writer method with validation + # @param sites [Object] Object to be assigned + # @!visibility private + def sites=(sites) + if sites.nil? + fail ArgumentError, 'invalid value for "sites", sites cannot be nil.' + end + @sites = sites + 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 && + sites == o.sites && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [sites, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_data.rb b/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_data.rb new file mode 100644 index 000000000000..09caefb4740d --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_data.rb @@ -0,0 +1,165 @@ +=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 + # Data object containing OAuth2 well-known sites information. + class OAuth2WellKnownSitesData + include BaseGenericModel + + # Attributes containing the list of public OAuth2 sites. + attr_reader :attributes + + # Environment identifier. + attr_reader :id + + # JSON:API resource type for OAuth2 well-known sites environment. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'OAuth2WellKnownSitesAttributes', + :'id' => :'String', + :'type' => :'OAuth2WellKnownSitesEnvType' + } + 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::OAuth2WellKnownSitesData` 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?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = 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 && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_env_type.rb b/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_env_type.rb new file mode 100644 index 000000000000..389596f4fb61 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_env_type.rb @@ -0,0 +1,26 @@ +=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 + # JSON:API resource type for OAuth2 well-known sites environment. + class OAuth2WellKnownSitesEnvType + include BaseEnumModel + + ENV = "env".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_response.rb b/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_response.rb new file mode 100644 index 000000000000..69adddbebc35 --- /dev/null +++ b/lib/datadog_api_client/v2/models/o_auth2_well_known_sites_response.rb @@ -0,0 +1,123 @@ +=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 + # Response payload containing the list of public OAuth2 sites for discovery. + class OAuth2WellKnownSitesResponse + include BaseGenericModel + + # Data object containing OAuth2 well-known sites information. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OAuth2WellKnownSitesData' + } + 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::OAuth2WellKnownSitesResponse` 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?(:'data') + self.data = attributes[:'data'] + 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + 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 && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end