diff --git a/.generated-info b/.generated-info index 8623329320a1..8dc0c2c9d3df 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "8001cbb", - "generated": "2025-08-13 20:27:07.288" + "spec_repo_commit": "8d438ee", + "generated": "2025-08-14 20:28:39.307" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5ab5923ba83d..76831148796f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1431,26 +1431,29 @@ components: - data type: object AWSAssumeRole: - description: The definition of `AWSAssumeRole` object. + description: The definition of the `AWSAssumeRole` object. properties: account_id: - description: AWS account the connection is created for + description: AWS account the connection is created for. example: '111222333444' pattern: ^\d{12}$ type: string external_id: description: External ID used to scope which connection can be used to assume - the role + the role. example: 33a1011635c44b38a064cf14e82e1d8f readOnly: true type: string + generate_new_external_id: + description: Pass true if the `external_id` should be regenerated. + type: boolean principal_id: - description: AWS account that will assume the role + description: AWS account that will assume the role. example: '123456789012' readOnly: true type: string role: - description: Role to assume + description: Role to assume. example: my-role type: string type: @@ -1461,7 +1464,7 @@ components: - role type: object AWSAssumeRoleType: - description: The definition of `AWSAssumeRoleType` object. + description: The definition of the `AWSAssumeRole` object. enum: - AWSAssumeRole example: AWSAssumeRole @@ -1469,18 +1472,18 @@ components: x-enum-varnames: - AWSASSUMEROLE AWSAssumeRoleUpdate: - description: The definition of `AWSAssumeRoleUpdate` object. + description: The definition of the `AWSAssumeRole` object. properties: account_id: - description: AWS account the connection is created for + description: AWS account the connection is created for. example: '111222333444' pattern: ^\d{12}$ type: string generate_new_external_id: - description: The `AWSAssumeRoleUpdate` `generate_new_external_id`. + description: Pass true if the `external_id` should be regenerated. type: boolean role: - description: Role to assume + description: Role to assume. example: my-role type: string type: @@ -1527,15 +1530,15 @@ components: - role_name type: object AWSCredentials: - description: The definition of `AWSCredentials` object. + description: The definition of the `AWSCredentials` object. oneOf: - $ref: '#/components/schemas/AWSAssumeRole' AWSCredentialsUpdate: - description: The definition of `AWSCredentialsUpdate` object. + description: The definition of the `AWSCredentialsUpdate` object. oneOf: - $ref: '#/components/schemas/AWSAssumeRoleUpdate' AWSIntegration: - description: The definition of `AWSIntegration` object. + description: The definition of the `AWSIntegration` object. properties: credentials: $ref: '#/components/schemas/AWSCredentials' @@ -1594,7 +1597,7 @@ components: x-enum-varnames: - PERMISSIONS AWSIntegrationType: - description: The definition of `AWSIntegrationType` object. + description: The definition of the `AWSIntegrationType` object. enum: - AWS example: AWS @@ -1602,7 +1605,7 @@ components: x-enum-varnames: - AWS AWSIntegrationUpdate: - description: The definition of `AWSIntegrationUpdate` object. + description: The definition of the `AWSIntegrationUpdate` object. properties: credentials: $ref: '#/components/schemas/AWSCredentialsUpdate' @@ -18478,6 +18481,46 @@ components: example: env:production type: string type: array + HTTPBasicAuth: + description: The definition of the `HTTPBasicAuth` object. + properties: + password: + description: Password used for authentication. Saved in a secret store + example: '' + type: string + type: + $ref: '#/components/schemas/HTTPBasicAuthType' + username: + description: Username used for authentication. + example: '' + type: string + required: + - type + - username + - password + type: object + HTTPBasicAuthType: + description: The definition of the `HTTPBasicAuth` object. + enum: + - HTTPBasicAuth + example: HTTPBasicAuth + type: string + x-enum-varnames: + - HTTPBASICAUTH + HTTPBasicAuthUpdate: + description: The definition of the `HTTPBasicAuth` object. + properties: + password: + description: Password used for authentication. Saved in a secret store + type: string + type: + $ref: '#/components/schemas/HTTPBasicAuthType' + username: + description: Username used for authentication. + type: string + required: + - type + type: object HTTPBody: description: The definition of `HTTPBody` object. properties: @@ -18516,13 +18559,17 @@ components: type: array type: object HTTPCredentials: - description: The definition of `HTTPCredentials` object. + description: The definition of the `HTTPCredentials` object. oneOf: - $ref: '#/components/schemas/HTTPTokenAuth' + - $ref: '#/components/schemas/HTTPBasicAuth' + - $ref: '#/components/schemas/HTTPMtlsAuth' HTTPCredentialsUpdate: - description: The definition of `HTTPCredentialsUpdate` object. + description: The definition of the `HTTPCredentialsUpdate` object. oneOf: - $ref: '#/components/schemas/HTTPTokenAuthUpdate' + - $ref: '#/components/schemas/HTTPBasicAuthUpdate' + - $ref: '#/components/schemas/HTTPMtlsAuthUpdate' HTTPHeader: description: The definition of `HTTPHeader` object. properties: @@ -18558,10 +18605,10 @@ components: - name type: object HTTPIntegration: - description: The definition of `HTTPIntegration` object. + description: The definition of the `HTTPIntegration` object. properties: base_url: - description: Base HTTP url for the integration + description: Base HTTP url for the integration. example: http://datadoghq.com type: string credentials: @@ -18574,7 +18621,7 @@ components: - credentials type: object HTTPIntegrationType: - description: The definition of `HTTPIntegrationType` object. + description: The definition of the `HTTPIntegrationType` object. enum: - HTTP example: HTTP @@ -18582,10 +18629,10 @@ components: x-enum-varnames: - HTTP HTTPIntegrationUpdate: - description: The definition of `HTTPIntegrationUpdate` object. + description: The definition of the `HTTPIntegrationUpdate` object. properties: base_url: - description: Base HTTP url for the integration + description: Base HTTP url for the integration. example: http://datadoghq.com type: string credentials: @@ -18671,6 +18718,46 @@ components: required: - message type: object + HTTPMtlsAuth: + description: The definition of the `HTTPMtlsAuth` object. + properties: + certificate: + description: Certificate of authority used to sign the request. + example: '' + type: string + private_key: + description: Private key used for the MTLS handshake + example: '' + type: string + type: + $ref: '#/components/schemas/HTTPMtlsAuthType' + required: + - type + - certificate + - private_key + type: object + HTTPMtlsAuthType: + description: The definition of the `HTTPMtlsAuth` object. + enum: + - HTTPMtlsAuth + example: HTTPMtlsAuth + type: string + x-enum-varnames: + - HTTPMTLSAUTH + HTTPMtlsAuthUpdate: + description: The definition of the `HTTPMtlsAuth` object. + properties: + certificate: + description: Certificate of authority used to sign the request. + type: string + private_key: + description: Private key used for the MTLS handshake + type: string + type: + $ref: '#/components/schemas/HTTPMtlsAuthType' + required: + - type + type: object HTTPToken: description: The definition of `HTTPToken` object. properties: @@ -18716,7 +18803,7 @@ components: - type type: object HTTPTokenAuthType: - description: The definition of `HTTPTokenAuthType` object. + description: The definition of the `HTTPTokenAuth` object. enum: - HTTPTokenAuth example: HTTPTokenAuth diff --git a/examples/v2/action-connection/CreateActionConnection_247736109.rb b/examples/v2/action-connection/CreateActionConnection_247736109.rb new file mode 100644 index 000000000000..541c6923ad4e --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection_247736109.rb @@ -0,0 +1,23 @@ +# Create a new Action Connection with HTTPMtlsAuth returns "Successfully created Action Connection" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new + +body = DatadogAPIClient::V2::CreateActionConnectionRequest.new({ + data: DatadogAPIClient::V2::ActionConnectionData.new({ + type: DatadogAPIClient::V2::ActionConnectionDataType::ACTION_CONNECTION, + attributes: DatadogAPIClient::V2::ActionConnectionAttributes.new({ + name: "HTTP mTLS Connection exampleactionconnection", + integration: DatadogAPIClient::V2::HTTPIntegration.new({ + type: DatadogAPIClient::V2::HTTPIntegrationType::HTTP, + base_url: "https://api.example.com", + credentials: DatadogAPIClient::V2::HTTPMtlsAuth.new({ + type: DatadogAPIClient::V2::HTTPMtlsAuthType::HTTPMTLSAUTH, + certificate: '-----BEGIN CERTIFICATE-----\nMIICXjCCAUYCCQDOGcCfCHfhPzANBgkqhkiG9w0BAQsFADAzMQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCQ0ExFTATBgNVBAoMDERhdGFkb2cgSW5jLjAeFw0yNDA1MTQw\nMDA1NThaFw0yNTA1MTQwMDA1NThaMDMxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJD\nQTEVMBMGA1UECgwMRGF0YWRvZyBJbmMuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\nMIIBCgKCAQEAwQDTmLqWv2L6YhzBcjKgPEzd3kE+9dZ4hBXBCjK6HgF/3aOKOSYq\nM9KPFHgJj6SjUJ+8TqX4sV6yW5xGX8dKjOpTYQfExEjGYcVrqKoOGg2k6dGkHyGm\n2VzL4zKyK1C3zJ4KpJnMYK8dPPcgzJvO7jGxGKMgLVU3VNdxKGTrqKmC6RbZLQOz\nM3fLp7bF2VcJ6VkGKW+yBK6vVMbQKMvjTbGqr3vIRd8SZzKRTsyIzXQDKgOv2vPn\nSqYJjKFJ8vJ7JeH6zGyLjQ1cGVy9jJ3+TjJoJhCGOyGzJpBGIcXfYjFDLcSRh7KE\nQIDAQABo1MwUTAdBgNVHQ4EFgQU/V8vJkPJ8b9yQnC/9bJ2kJGJ5MjoyEwHwYDVR0j\nBBgwFoAU/V8vJkPJ8b9yQnC/9bJ2kJGJ5Mjo\n-----END CERTIFICATE-----', + private_key: '-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDBaNOMV7V8T7gR\nOmNcNfqGHxPrLLo1w2J7J8h6S8bVD9yCH2JKV8J5G2J8J0V8J3Jg8b3Jg8LxJgV\nV8J6JgV8J9JgJg8LJg8VJgV5JgLLJgVVJg8V4Jg8VLJg8V6JgV8JqJgVV8J3JgV\nV8J7JgVV8J5JgVV8J8JgVVJg8LJgJVLJgLVJgVVJgLJgVVJgVVJgVVJgLVJgVV\nJgVVJgVVJgLJgVVJgLVJgLLJgVVJgVLJgVVJgVLJgVVJgVVJgVVJgVVJgVVJg\nVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJ\nAgMBAAECggEBAKoJkJJJJkJJkJ\n-----END PRIVATE KEY-----', + }), + }), + }), + }), +}) +p api_instance.create_action_connection(body) diff --git a/examples/v2/action-connection/CreateActionConnection_778774383.rb b/examples/v2/action-connection/CreateActionConnection_778774383.rb new file mode 100644 index 000000000000..3719beae0161 --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection_778774383.rb @@ -0,0 +1,23 @@ +# Create a new Action Connection with HTTPBasicAuth returns "Successfully created Action Connection" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new + +body = DatadogAPIClient::V2::CreateActionConnectionRequest.new({ + data: DatadogAPIClient::V2::ActionConnectionData.new({ + type: DatadogAPIClient::V2::ActionConnectionDataType::ACTION_CONNECTION, + attributes: DatadogAPIClient::V2::ActionConnectionAttributes.new({ + name: "HTTP Basic Auth Connection exampleactionconnection", + integration: DatadogAPIClient::V2::HTTPIntegration.new({ + type: DatadogAPIClient::V2::HTTPIntegrationType::HTTP, + base_url: "https://api.example.com", + credentials: DatadogAPIClient::V2::HTTPBasicAuth.new({ + type: DatadogAPIClient::V2::HTTPBasicAuthType::HTTPBASICAUTH, + username: "test-user", + password: "test-password", + }), + }), + }), + }), +}) +p api_instance.create_action_connection(body) diff --git a/examples/v2/action-connection/CreateActionConnection_912926606.rb b/examples/v2/action-connection/CreateActionConnection_912926606.rb new file mode 100644 index 000000000000..7135b023f984 --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection_912926606.rb @@ -0,0 +1,34 @@ +# Create a new Action Connection with HTTPTokenAuth returns "Successfully created Action Connection" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new + +body = DatadogAPIClient::V2::CreateActionConnectionRequest.new({ + data: DatadogAPIClient::V2::ActionConnectionData.new({ + type: DatadogAPIClient::V2::ActionConnectionDataType::ACTION_CONNECTION, + attributes: DatadogAPIClient::V2::ActionConnectionAttributes.new({ + name: "HTTP Token Connection exampleactionconnection", + integration: DatadogAPIClient::V2::HTTPIntegration.new({ + type: DatadogAPIClient::V2::HTTPIntegrationType::HTTP, + base_url: "https://api.example.com", + credentials: DatadogAPIClient::V2::HTTPTokenAuth.new({ + type: DatadogAPIClient::V2::HTTPTokenAuthType::HTTPTOKENAUTH, + tokens: [ + DatadogAPIClient::V2::HTTPToken.new({ + name: "ApiKey", + type: DatadogAPIClient::V2::TokenType::SECRET, + value: "secret-token-value", + }), + ], + headers: [ + DatadogAPIClient::V2::HTTPHeader.new({ + name: "Authorization", + value: "Bearer token-value", + }), + ], + }), + }), + }), + }), +}) +p api_instance.create_action_connection(body) diff --git a/examples/v2/action-connection/UpdateActionConnection_1293363740.rb b/examples/v2/action-connection/UpdateActionConnection_1293363740.rb new file mode 100644 index 000000000000..5ed6326c0ebe --- /dev/null +++ b/examples/v2/action-connection/UpdateActionConnection_1293363740.rb @@ -0,0 +1,23 @@ +# Update an existing Action Connection with HTTPBasicAuth returns "Successfully updated Action Connection" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new + +body = DatadogAPIClient::V2::UpdateActionConnectionRequest.new({ + data: DatadogAPIClient::V2::ActionConnectionDataUpdate.new({ + type: DatadogAPIClient::V2::ActionConnectionDataType::ACTION_CONNECTION, + attributes: DatadogAPIClient::V2::ActionConnectionAttributesUpdate.new({ + name: "HTTP Basic Auth Updated", + integration: DatadogAPIClient::V2::HTTPIntegrationUpdate.new({ + type: DatadogAPIClient::V2::HTTPIntegrationType::HTTP, + base_url: "https://api.updated.com", + credentials: DatadogAPIClient::V2::HTTPBasicAuthUpdate.new({ + type: DatadogAPIClient::V2::HTTPBasicAuthType::HTTPBASICAUTH, + username: "updated-user", + password: "updated-password", + }), + }), + }), + }), +}) +p api_instance.update_action_connection("cb460d51-3c88-4e87-adac-d47131d0423d", body) diff --git a/features/v2/action_connection.feature b/features/v2/action_connection.feature index 759615a8fd63..28123b567652 100644 --- a/features/v2/action_connection.feature +++ b/features/v2/action_connection.feature @@ -28,6 +28,41 @@ Feature: Action Connection When the request is sent Then the response status is 201 Successfully created Action Connection + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with HTTPBasicAuth returns "Successfully created Action Connection" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"HTTP Basic Auth Connection {{ unique_lower_alnum }}","integration":{"type":"HTTP","base_url":"https://api.example.com","credentials":{"type":"HTTPBasicAuth","username":"test-user","password":"test-password"}}}}} + When the request is sent + Then the response status is 201 Successfully created Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with HTTPMtlsAuth returns "Successfully created Action Connection" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"HTTP mTLS Connection {{ unique_lower_alnum }}","integration":{"type":"HTTP","base_url":"https://api.example.com","credentials":{"type":"HTTPMtlsAuth","certificate":"-----BEGIN CERTIFICATE-----\nMIICXjCCAUYCCQDOGcCfCHfhPzANBgkqhkiG9w0BAQsFADAzMQswCQYDVQQGEwJV\nUzELMAkGA1UECAwCQ0ExFTATBgNVBAoMDERhdGFkb2cgSW5jLjAeFw0yNDA1MTQw\nMDA1NThaFw0yNTA1MTQwMDA1NThaMDMxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJD\nQTEVMBMGA1UECgwMRGF0YWRvZyBJbmMuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\nMIIBCgKCAQEAwQDTmLqWv2L6YhzBcjKgPEzd3kE+9dZ4hBXBCjK6HgF/3aOKOSYq\nM9KPFHgJj6SjUJ+8TqX4sV6yW5xGX8dKjOpTYQfExEjGYcVrqKoOGg2k6dGkHyGm\n2VzL4zKyK1C3zJ4KpJnMYK8dPPcgzJvO7jGxGKMgLVU3VNdxKGTrqKmC6RbZLQOz\nM3fLp7bF2VcJ6VkGKW+yBK6vVMbQKMvjTbGqr3vIRd8SZzKRTsyIzXQDKgOv2vPn\nSqYJjKFJ8vJ7JeH6zGyLjQ1cGVy9jJ3+TjJoJhCGOyGzJpBGIcXfYjFDLcSRh7KE\nQIDAQABo1MwUTAdBgNVHQ4EFgQU/V8vJkPJ8b9yQnC/9bJ2kJGJ5MjoyEwHwYDVR0j\nBBgwFoAU/V8vJkPJ8b9yQnC/9bJ2kJGJ5Mjo\n-----END CERTIFICATE-----","private_key":"-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDBaNOMV7V8T7gR\nOmNcNfqGHxPrLLo1w2J7J8h6S8bVD9yCH2JKV8J5G2J8J0V8J3Jg8b3Jg8LxJgV\nV8J6JgV8J9JgJg8LJg8VJgV5JgLLJgVVJg8V4Jg8VLJg8V6JgV8JqJgVV8J3JgV\nV8J7JgVV8J5JgVV8J8JgVVJg8LJgJVLJgLVJgVVJgLJgVVJgVVJgVVJgLVJgVV\nJgVVJgVVJgLJgVVJgLVJgLLJgVVJgVLJgVVJgVLJgVVJgVVJgVVJgVVJgVVJg\nVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJgVVJ\nAgMBAAECggEBAKoJkJJJJkJJkJ\n-----END PRIVATE KEY-----"}}}}} + When the request is sent + Then the response status is 201 Successfully created Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with HTTPTokenAuth returns "Successfully created Action Connection" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"HTTP Token Connection {{ unique_lower_alnum }}","integration":{"type":"HTTP","base_url":"https://api.example.com","credentials":{"type":"HTTPTokenAuth","tokens":[{"name":"ApiKey","type":"SECRET","value":"secret-token-value"}],"headers":[{"name":"Authorization","value":"Bearer token-value"}]}}}}} + When the request is sent + Then the response status is 201 Successfully created Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with invalid HTTPCredentials returns "Bad Request" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"Invalid HTTP Connection","integration":{"type":"HTTP","base_url":"https://api.example.com","credentials":{"type":"HTTPBasicAuth","username":"test-user"}}}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/workflow-automation-dev + Scenario: Create a new Action Connection with missing base_url returns "Bad Request" response + Given new "CreateActionConnection" request + And body with value {"data":{"type":"action_connection","attributes":{"name":"Missing Base URL Connection","integration":{"type":"HTTP","credentials":{"type":"HTTPBasicAuth","username":"test-user","password":"test-password"}}}}} + When the request is sent + Then the response status is 400 Bad Request + @team:DataDog/workflow-automation-dev Scenario: Delete an existing Action Connection returns "Not Found" response Given new "DeleteActionConnection" request @@ -155,3 +190,11 @@ Feature: Action Connection And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}} When the request is sent Then the response status is 200 Successfully updated Action Connection + + @team:DataDog/workflow-automation-dev + Scenario: Update an existing Action Connection with HTTPBasicAuth returns "Successfully updated Action Connection" response + Given new "UpdateActionConnection" request + And request contains "connection_id" parameter with value "cb460d51-3c88-4e87-adac-d47131d0423d" + And body with value {"data":{"type":"action_connection","attributes":{"name":"HTTP Basic Auth Updated","integration":{"type":"HTTP","base_url":"https://api.updated.com","credentials":{"type":"HTTPBasicAuth","username":"updated-user","password":"updated-password"}}}}} + When the request is sent + Then the response status is 200 Successfully updated Action Connection diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index f308b274bb02..62cf5b8d361a 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2078,6 +2078,9 @@ def overrides "v2.hourly_usage_pagination" => "HourlyUsagePagination", "v2.hourly_usage_response" => "HourlyUsageResponse", "v2.hourly_usage_type" => "HourlyUsageType", + "v2.http_basic_auth" => "HTTPBasicAuth", + "v2.http_basic_auth_type" => "HTTPBasicAuthType", + "v2.http_basic_auth_update" => "HTTPBasicAuthUpdate", "v2.http_body" => "HTTPBody", "v2.httpci_app_error" => "HTTPCIAppError", "v2.httpci_app_errors" => "HTTPCIAppErrors", @@ -2091,6 +2094,9 @@ def overrides "v2.http_log_error" => "HTTPLogError", "v2.http_log_errors" => "HTTPLogErrors", "v2.http_log_item" => "HTTPLogItem", + "v2.http_mtls_auth" => "HTTPMtlsAuth", + "v2.http_mtls_auth_type" => "HTTPMtlsAuthType", + "v2.http_mtls_auth_update" => "HTTPMtlsAuthUpdate", "v2.http_token" => "HTTPToken", "v2.http_token_auth" => "HTTPTokenAuth", "v2.http_token_auth_type" => "HTTPTokenAuthType", diff --git a/lib/datadog_api_client/v2/models/aws_assume_role.rb b/lib/datadog_api_client/v2/models/aws_assume_role.rb index 2ad6f6f8d2f4..4e4ce10012fd 100644 --- a/lib/datadog_api_client/v2/models/aws_assume_role.rb +++ b/lib/datadog_api_client/v2/models/aws_assume_role.rb @@ -17,23 +17,26 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `AWSAssumeRole` object. + # The definition of the `AWSAssumeRole` object. class AWSAssumeRole include BaseGenericModel - # AWS account the connection is created for + # AWS account the connection is created for. attr_reader :account_id - # External ID used to scope which connection can be used to assume the role + # External ID used to scope which connection can be used to assume the role. attr_accessor :external_id - # AWS account that will assume the role + # Pass true if the `external_id` should be regenerated. + attr_accessor :generate_new_external_id + + # AWS account that will assume the role. attr_accessor :principal_id - # Role to assume + # Role to assume. attr_reader :role - # The definition of `AWSAssumeRoleType` object. + # The definition of the `AWSAssumeRole` object. attr_reader :type attr_accessor :additional_properties @@ -44,6 +47,7 @@ def self.attribute_map { :'account_id' => :'account_id', :'external_id' => :'external_id', + :'generate_new_external_id' => :'generate_new_external_id', :'principal_id' => :'principal_id', :'role' => :'role', :'type' => :'type' @@ -56,6 +60,7 @@ def self.openapi_types { :'account_id' => :'String', :'external_id' => :'String', + :'generate_new_external_id' => :'Boolean', :'principal_id' => :'String', :'role' => :'String', :'type' => :'AWSAssumeRoleType' @@ -88,6 +93,10 @@ def initialize(attributes = {}) self.external_id = attributes[:'external_id'] end + if attributes.key?(:'generate_new_external_id') + self.generate_new_external_id = attributes[:'generate_new_external_id'] + end + if attributes.key?(:'principal_id') self.principal_id = attributes[:'principal_id'] end @@ -175,6 +184,7 @@ def ==(o) self.class == o.class && account_id == o.account_id && external_id == o.external_id && + generate_new_external_id == o.generate_new_external_id && principal_id == o.principal_id && role == o.role && type == o.type && @@ -185,7 +195,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [account_id, external_id, principal_id, role, type, additional_properties].hash + [account_id, external_id, generate_new_external_id, principal_id, role, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/aws_assume_role_type.rb b/lib/datadog_api_client/v2/models/aws_assume_role_type.rb index 77ded2d76ba5..1b17442bc800 100644 --- a/lib/datadog_api_client/v2/models/aws_assume_role_type.rb +++ b/lib/datadog_api_client/v2/models/aws_assume_role_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `AWSAssumeRoleType` object. + # The definition of the `AWSAssumeRole` object. class AWSAssumeRoleType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/aws_assume_role_update.rb b/lib/datadog_api_client/v2/models/aws_assume_role_update.rb index 4e15b499b2d7..6e772c838b45 100644 --- a/lib/datadog_api_client/v2/models/aws_assume_role_update.rb +++ b/lib/datadog_api_client/v2/models/aws_assume_role_update.rb @@ -17,20 +17,20 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `AWSAssumeRoleUpdate` object. + # The definition of the `AWSAssumeRole` object. class AWSAssumeRoleUpdate include BaseGenericModel - # AWS account the connection is created for + # AWS account the connection is created for. attr_reader :account_id - # The `AWSAssumeRoleUpdate` `generate_new_external_id`. + # Pass true if the `external_id` should be regenerated. attr_accessor :generate_new_external_id - # Role to assume + # Role to assume. attr_accessor :role - # The definition of `AWSAssumeRoleType` object. + # The definition of the `AWSAssumeRole` object. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/aws_credentials.rb b/lib/datadog_api_client/v2/models/aws_credentials.rb index 050cf4f42f98..3491ca8a3985 100644 --- a/lib/datadog_api_client/v2/models/aws_credentials.rb +++ b/lib/datadog_api_client/v2/models/aws_credentials.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `AWSCredentials` object. + # The definition of the `AWSCredentials` object. module AWSCredentials class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/aws_credentials_update.rb b/lib/datadog_api_client/v2/models/aws_credentials_update.rb index 11508331d80f..f895883842b2 100644 --- a/lib/datadog_api_client/v2/models/aws_credentials_update.rb +++ b/lib/datadog_api_client/v2/models/aws_credentials_update.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `AWSCredentialsUpdate` object. + # The definition of the `AWSCredentialsUpdate` object. module AWSCredentialsUpdate class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/aws_integration.rb b/lib/datadog_api_client/v2/models/aws_integration.rb index c77b4b0b542b..49b7a6c24338 100644 --- a/lib/datadog_api_client/v2/models/aws_integration.rb +++ b/lib/datadog_api_client/v2/models/aws_integration.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `AWSIntegration` object. + # The definition of the `AWSIntegration` object. class AWSIntegration include BaseGenericModel - # The definition of `AWSCredentials` object. + # The definition of the `AWSCredentials` object. attr_reader :credentials - # The definition of `AWSIntegrationType` object. + # The definition of the `AWSIntegrationType` object. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/aws_integration_type.rb b/lib/datadog_api_client/v2/models/aws_integration_type.rb index d6a0e9561278..cdd992c6418a 100644 --- a/lib/datadog_api_client/v2/models/aws_integration_type.rb +++ b/lib/datadog_api_client/v2/models/aws_integration_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `AWSIntegrationType` object. + # The definition of the `AWSIntegrationType` object. class AWSIntegrationType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/aws_integration_update.rb b/lib/datadog_api_client/v2/models/aws_integration_update.rb index 766037edd4ee..2ea7ce7ad1a9 100644 --- a/lib/datadog_api_client/v2/models/aws_integration_update.rb +++ b/lib/datadog_api_client/v2/models/aws_integration_update.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `AWSIntegrationUpdate` object. + # The definition of the `AWSIntegrationUpdate` object. class AWSIntegrationUpdate include BaseGenericModel - # The definition of `AWSCredentialsUpdate` object. + # The definition of the `AWSCredentialsUpdate` object. attr_accessor :credentials - # The definition of `AWSIntegrationType` object. + # The definition of the `AWSIntegrationType` object. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/http_basic_auth.rb b/lib/datadog_api_client/v2/models/http_basic_auth.rb new file mode 100644 index 000000000000..7cea2f46d0a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/http_basic_auth.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 + # The definition of the `HTTPBasicAuth` object. + class HTTPBasicAuth + include BaseGenericModel + + # Password used for authentication. Saved in a secret store + attr_reader :password + + # The definition of the `HTTPBasicAuth` object. + attr_reader :type + + # Username used for authentication. + attr_reader :username + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'password' => :'password', + :'type' => :'type', + :'username' => :'username' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'password' => :'String', + :'type' => :'HTTPBasicAuthType', + :'username' => :'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::HTTPBasicAuth` 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?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + 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 @password.nil? + return false if @type.nil? + return false if @username.nil? + true + end + + # Custom attribute writer method with validation + # @param password [Object] Object to be assigned + # @!visibility private + def password=(password) + if password.nil? + fail ArgumentError, 'invalid value for "password", password cannot be nil.' + end + @password = password + 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 + + # Custom attribute writer method with validation + # @param username [Object] Object to be assigned + # @!visibility private + def username=(username) + if username.nil? + fail ArgumentError, 'invalid value for "username", username cannot be nil.' + end + @username = username + 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 && + password == o.password && + type == o.type && + username == o.username && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [password, type, username, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/http_basic_auth_type.rb b/lib/datadog_api_client/v2/models/http_basic_auth_type.rb new file mode 100644 index 000000000000..ca36467fad8b --- /dev/null +++ b/lib/datadog_api_client/v2/models/http_basic_auth_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 + # The definition of the `HTTPBasicAuth` object. + class HTTPBasicAuthType + include BaseEnumModel + + HTTPBASICAUTH = "HTTPBasicAuth".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/http_basic_auth_update.rb b/lib/datadog_api_client/v2/models/http_basic_auth_update.rb new file mode 100644 index 000000000000..c592b91febfa --- /dev/null +++ b/lib/datadog_api_client/v2/models/http_basic_auth_update.rb @@ -0,0 +1,143 @@ +=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 + # The definition of the `HTTPBasicAuth` object. + class HTTPBasicAuthUpdate + include BaseGenericModel + + # Password used for authentication. Saved in a secret store + attr_accessor :password + + # The definition of the `HTTPBasicAuth` object. + attr_reader :type + + # Username used for authentication. + attr_accessor :username + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'password' => :'password', + :'type' => :'type', + :'username' => :'username' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'password' => :'String', + :'type' => :'HTTPBasicAuthType', + :'username' => :'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::HTTPBasicAuthUpdate` 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?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + 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 @type.nil? + true + 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 && + password == o.password && + type == o.type && + username == o.username && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [password, type, username, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/http_credentials.rb b/lib/datadog_api_client/v2/models/http_credentials.rb index 51c58d743680..18eb4a100079 100644 --- a/lib/datadog_api_client/v2/models/http_credentials.rb +++ b/lib/datadog_api_client/v2/models/http_credentials.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `HTTPCredentials` object. + # The definition of the `HTTPCredentials` object. module HTTPCredentials class << self include BaseOneOfModel @@ -26,7 +26,9 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ - :'HTTPTokenAuth' + :'HTTPTokenAuth', + :'HTTPBasicAuth', + :'HTTPMtlsAuth' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/http_credentials_update.rb b/lib/datadog_api_client/v2/models/http_credentials_update.rb index 0845ed3aad5c..146b528a1ee8 100644 --- a/lib/datadog_api_client/v2/models/http_credentials_update.rb +++ b/lib/datadog_api_client/v2/models/http_credentials_update.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `HTTPCredentialsUpdate` object. + # The definition of the `HTTPCredentialsUpdate` object. module HTTPCredentialsUpdate class << self include BaseOneOfModel @@ -26,7 +26,9 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ - :'HTTPTokenAuthUpdate' + :'HTTPTokenAuthUpdate', + :'HTTPBasicAuthUpdate', + :'HTTPMtlsAuthUpdate' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/http_integration.rb b/lib/datadog_api_client/v2/models/http_integration.rb index cafe256f1b4a..14211b15b2ec 100644 --- a/lib/datadog_api_client/v2/models/http_integration.rb +++ b/lib/datadog_api_client/v2/models/http_integration.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `HTTPIntegration` object. + # The definition of the `HTTPIntegration` object. class HTTPIntegration include BaseGenericModel - # Base HTTP url for the integration + # Base HTTP url for the integration. attr_reader :base_url - # The definition of `HTTPCredentials` object. + # The definition of the `HTTPCredentials` object. attr_reader :credentials - # The definition of `HTTPIntegrationType` object. + # The definition of the `HTTPIntegrationType` object. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/http_integration_type.rb b/lib/datadog_api_client/v2/models/http_integration_type.rb index 52e28df4c2da..07ea2be15788 100644 --- a/lib/datadog_api_client/v2/models/http_integration_type.rb +++ b/lib/datadog_api_client/v2/models/http_integration_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `HTTPIntegrationType` object. + # The definition of the `HTTPIntegrationType` object. class HTTPIntegrationType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/http_integration_update.rb b/lib/datadog_api_client/v2/models/http_integration_update.rb index d1b327516ac4..c8641ec0ee47 100644 --- a/lib/datadog_api_client/v2/models/http_integration_update.rb +++ b/lib/datadog_api_client/v2/models/http_integration_update.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `HTTPIntegrationUpdate` object. + # The definition of the `HTTPIntegrationUpdate` object. class HTTPIntegrationUpdate include BaseGenericModel - # Base HTTP url for the integration + # Base HTTP url for the integration. attr_accessor :base_url - # The definition of `HTTPCredentialsUpdate` object. + # The definition of the `HTTPCredentialsUpdate` object. attr_accessor :credentials - # The definition of `HTTPIntegrationType` object. + # The definition of the `HTTPIntegrationType` object. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/http_mtls_auth.rb b/lib/datadog_api_client/v2/models/http_mtls_auth.rb new file mode 100644 index 000000000000..33160b1ba032 --- /dev/null +++ b/lib/datadog_api_client/v2/models/http_mtls_auth.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 + # The definition of the `HTTPMtlsAuth` object. + class HTTPMtlsAuth + include BaseGenericModel + + # Certificate of authority used to sign the request. + attr_reader :certificate + + # Private key used for the MTLS handshake + attr_reader :private_key + + # The definition of the `HTTPMtlsAuth` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'certificate' => :'certificate', + :'private_key' => :'private_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'certificate' => :'String', + :'private_key' => :'String', + :'type' => :'HTTPMtlsAuthType' + } + 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::HTTPMtlsAuth` 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?(:'certificate') + self.certificate = attributes[:'certificate'] + end + + if attributes.key?(:'private_key') + self.private_key = attributes[:'private_key'] + 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 @certificate.nil? + return false if @private_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param certificate [Object] Object to be assigned + # @!visibility private + def certificate=(certificate) + if certificate.nil? + fail ArgumentError, 'invalid value for "certificate", certificate cannot be nil.' + end + @certificate = certificate + end + + # Custom attribute writer method with validation + # @param private_key [Object] Object to be assigned + # @!visibility private + def private_key=(private_key) + if private_key.nil? + fail ArgumentError, 'invalid value for "private_key", private_key cannot be nil.' + end + @private_key = private_key + 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 && + certificate == o.certificate && + private_key == o.private_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [certificate, private_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/http_mtls_auth_type.rb b/lib/datadog_api_client/v2/models/http_mtls_auth_type.rb new file mode 100644 index 000000000000..1aa75d5200d6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/http_mtls_auth_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 + # The definition of the `HTTPMtlsAuth` object. + class HTTPMtlsAuthType + include BaseEnumModel + + HTTPMTLSAUTH = "HTTPMtlsAuth".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/http_mtls_auth_update.rb b/lib/datadog_api_client/v2/models/http_mtls_auth_update.rb new file mode 100644 index 000000000000..4bcb0bef4527 --- /dev/null +++ b/lib/datadog_api_client/v2/models/http_mtls_auth_update.rb @@ -0,0 +1,143 @@ +=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 + # The definition of the `HTTPMtlsAuth` object. + class HTTPMtlsAuthUpdate + include BaseGenericModel + + # Certificate of authority used to sign the request. + attr_accessor :certificate + + # Private key used for the MTLS handshake + attr_accessor :private_key + + # The definition of the `HTTPMtlsAuth` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'certificate' => :'certificate', + :'private_key' => :'private_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'certificate' => :'String', + :'private_key' => :'String', + :'type' => :'HTTPMtlsAuthType' + } + 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::HTTPMtlsAuthUpdate` 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?(:'certificate') + self.certificate = attributes[:'certificate'] + end + + if attributes.key?(:'private_key') + self.private_key = attributes[:'private_key'] + 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 @type.nil? + true + 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 && + certificate == o.certificate && + private_key == o.private_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [certificate, private_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/http_token_auth.rb b/lib/datadog_api_client/v2/models/http_token_auth.rb index 92f6dfa68a25..845d5c356865 100644 --- a/lib/datadog_api_client/v2/models/http_token_auth.rb +++ b/lib/datadog_api_client/v2/models/http_token_auth.rb @@ -30,7 +30,7 @@ class HTTPTokenAuth # The `HTTPTokenAuth` `tokens`. attr_accessor :tokens - # The definition of `HTTPTokenAuthType` object. + # The definition of the `HTTPTokenAuth` object. attr_reader :type # The `HTTPTokenAuth` `url_parameters`. diff --git a/lib/datadog_api_client/v2/models/http_token_auth_type.rb b/lib/datadog_api_client/v2/models/http_token_auth_type.rb index 03274c13060c..96304cb3bc12 100644 --- a/lib/datadog_api_client/v2/models/http_token_auth_type.rb +++ b/lib/datadog_api_client/v2/models/http_token_auth_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The definition of `HTTPTokenAuthType` object. + # The definition of the `HTTPTokenAuth` object. class HTTPTokenAuthType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/http_token_auth_update.rb b/lib/datadog_api_client/v2/models/http_token_auth_update.rb index 672233d517c9..50257ee1fef5 100644 --- a/lib/datadog_api_client/v2/models/http_token_auth_update.rb +++ b/lib/datadog_api_client/v2/models/http_token_auth_update.rb @@ -30,7 +30,7 @@ class HTTPTokenAuthUpdate # The `HTTPTokenAuthUpdate` `tokens`. attr_accessor :tokens - # The definition of `HTTPTokenAuthType` object. + # The definition of the `HTTPTokenAuth` object. attr_reader :type # The `HTTPTokenAuthUpdate` `url_parameters`.