Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "dc49df4",
"generated": "2025-07-18 13:57:23.914"
"spec_repo_commit": "0f24b8e",
"generated": "2025-07-18 16:53:06.032"
}
99 changes: 99 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2016,11 +2016,13 @@ components:
description: The definition of `ActionConnectionIntegration` object.
oneOf:
- $ref: '#/components/schemas/AWSIntegration'
- $ref: '#/components/schemas/DatadogIntegration'
- $ref: '#/components/schemas/HTTPIntegration'
ActionConnectionIntegrationUpdate:
description: The definition of `ActionConnectionIntegrationUpdate` object.
oneOf:
- $ref: '#/components/schemas/AWSIntegrationUpdate'
- $ref: '#/components/schemas/DatadogIntegrationUpdate'
- $ref: '#/components/schemas/HTTPIntegrationUpdate'
ActionQuery:
description: An action query. This query type is used to trigger an action,
Expand Down Expand Up @@ -12378,6 +12380,103 @@ components:
required:
- databaseMonitoringTrigger
type: object
DatadogAPIKey:
description: The definition of the `DatadogAPIKey` object.
properties:
api_key:
description: The `DatadogAPIKey` `api_key`.
example: ''
type: string
app_key:
description: The `DatadogAPIKey` `app_key`.
example: ''
type: string
datacenter:
description: The `DatadogAPIKey` `datacenter`.
example: ''
type: string
subdomain:
description: Custom subdomain used for Datadog URLs generated with this
Connection. For example, if this org uses `https://acme.datadoghq.com`
to access Datadog, set this field to `acme`. If this field is omitted,
generated URLs will use the default site URL for its datacenter (see [https://docs.datadoghq.com/getting_started/site](https://docs.datadoghq.com/getting_started/site)).
type: string
type:
$ref: '#/components/schemas/DatadogAPIKeyType'
required:
- type
- datacenter
- api_key
- app_key
type: object
DatadogAPIKeyType:
description: The definition of the `DatadogAPIKey` object.
enum:
- DatadogAPIKey
example: DatadogAPIKey
type: string
x-enum-varnames:
- DATADOGAPIKEY
DatadogAPIKeyUpdate:
description: The definition of the `DatadogAPIKey` object.
properties:
api_key:
description: The `DatadogAPIKeyUpdate` `api_key`.
type: string
app_key:
description: The `DatadogAPIKeyUpdate` `app_key`.
type: string
datacenter:
description: The `DatadogAPIKeyUpdate` `datacenter`.
type: string
subdomain:
description: Custom subdomain used for Datadog URLs generated with this
Connection. For example, if this org uses `https://acme.datadoghq.com`
to access Datadog, set this field to `acme`. If this field is omitted,
generated URLs will use the default site URL for its datacenter (see [https://docs.datadoghq.com/getting_started/site](https://docs.datadoghq.com/getting_started/site)).
type: string
type:
$ref: '#/components/schemas/DatadogAPIKeyType'
required:
- type
type: object
DatadogCredentials:
description: The definition of the `DatadogCredentials` object.
oneOf:
- $ref: '#/components/schemas/DatadogAPIKey'
DatadogCredentialsUpdate:
description: The definition of the `DatadogCredentialsUpdate` object.
oneOf:
- $ref: '#/components/schemas/DatadogAPIKeyUpdate'
DatadogIntegration:
description: The definition of the `DatadogIntegration` object.
properties:
credentials:
$ref: '#/components/schemas/DatadogCredentials'
type:
$ref: '#/components/schemas/DatadogIntegrationType'
required:
- type
- credentials
type: object
DatadogIntegrationType:
description: The definition of the `DatadogIntegrationType` object.
enum:
- Datadog
example: Datadog
type: string
x-enum-varnames:
- DATADOG
DatadogIntegrationUpdate:
description: The definition of the `DatadogIntegrationUpdate` object.
properties:
credentials:
$ref: '#/components/schemas/DatadogCredentialsUpdate'
type:
$ref: '#/components/schemas/DatadogIntegrationType'
required:
- type
type: object
Dataset:
description: Dataset object.
properties:
Expand Down
8 changes: 8 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,14 @@ def overrides
"v2.data_deletion_response_item" => "DataDeletionResponseItem",
"v2.data_deletion_response_item_attributes" => "DataDeletionResponseItemAttributes",
"v2.data_deletion_response_meta" => "DataDeletionResponseMeta",
"v2.datadog_api_key" => "DatadogAPIKey",
"v2.datadog_api_key_type" => "DatadogAPIKeyType",
"v2.datadog_api_key_update" => "DatadogAPIKeyUpdate",
"v2.datadog_credentials" => "DatadogCredentials",
"v2.datadog_credentials_update" => "DatadogCredentialsUpdate",
"v2.datadog_integration" => "DatadogIntegration",
"v2.datadog_integration_type" => "DatadogIntegrationType",
"v2.datadog_integration_update" => "DatadogIntegrationUpdate",
"v2.data_relationships_teams" => "DataRelationshipsTeams",
"v2.data_relationships_teams_data_items" => "DataRelationshipsTeamsDataItems",
"v2.data_relationships_teams_data_items_type" => "DataRelationshipsTeamsDataItemsType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class << self
def openapi_one_of
[
:'AWSIntegration',
:'DatadogIntegration',
:'HTTPIntegration'
]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class << self
def openapi_one_of
[
:'AWSIntegrationUpdate',
:'DatadogIntegrationUpdate',
:'HTTPIntegrationUpdate'
]
end
Expand Down
196 changes: 196 additions & 0 deletions lib/datadog_api_client/v2/models/datadog_api_key.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: [email protected]
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
# The definition of the `DatadogAPIKey` object.
class DatadogAPIKey
include BaseGenericModel

# The `DatadogAPIKey` `api_key`.
attr_reader :api_key

# The `DatadogAPIKey` `app_key`.
attr_reader :app_key

# The `DatadogAPIKey` `datacenter`.
attr_reader :datacenter

# Custom subdomain used for Datadog URLs generated with this Connection. For example, if this org uses `https://acme.datadoghq.com` to access Datadog, set this field to `acme`. If this field is omitted, generated URLs will use the default site URL for its datacenter (see [https://docs.datadoghq.com/getting_started/site](https://docs.datadoghq.com/getting_started/site)).
attr_accessor :subdomain

# The definition of the `DatadogAPIKey` object.
attr_reader :type

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'api_key' => :'api_key',
:'app_key' => :'app_key',
:'datacenter' => :'datacenter',
:'subdomain' => :'subdomain',
:'type' => :'type'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'api_key' => :'String',
:'app_key' => :'String',
:'datacenter' => :'String',
:'subdomain' => :'String',
:'type' => :'DatadogAPIKeyType'
}
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::DatadogAPIKey` 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?(:'api_key')
self.api_key = attributes[:'api_key']
end

if attributes.key?(:'app_key')
self.app_key = attributes[:'app_key']
end

if attributes.key?(:'datacenter')
self.datacenter = attributes[:'datacenter']
end

if attributes.key?(:'subdomain')
self.subdomain = attributes[:'subdomain']
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 @api_key.nil?
return false if @app_key.nil?
return false if @datacenter.nil?
return false if @type.nil?
true
end

# Custom attribute writer method with validation
# @param api_key [Object] Object to be assigned
# @!visibility private
def api_key=(api_key)
if api_key.nil?
fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.'
end
@api_key = api_key
end

# Custom attribute writer method with validation
# @param app_key [Object] Object to be assigned
# @!visibility private
def app_key=(app_key)
if app_key.nil?
fail ArgumentError, 'invalid value for "app_key", app_key cannot be nil.'
end
@app_key = app_key
end

# Custom attribute writer method with validation
# @param datacenter [Object] Object to be assigned
# @!visibility private
def datacenter=(datacenter)
if datacenter.nil?
fail ArgumentError, 'invalid value for "datacenter", datacenter cannot be nil.'
end
@datacenter = datacenter
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 &&
api_key == o.api_key &&
app_key == o.app_key &&
datacenter == o.datacenter &&
subdomain == o.subdomain &&
type == o.type &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[api_key, app_key, datacenter, subdomain, type, additional_properties].hash
end
end
end
26 changes: 26 additions & 0 deletions lib/datadog_api_client/v2/models/datadog_api_key_type.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: [email protected]
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
# The definition of the `DatadogAPIKey` object.
class DatadogAPIKeyType
include BaseEnumModel

DATADOGAPIKEY = "DatadogAPIKey".freeze
end
end
Loading
Loading