From a38d88ea5f6ad40583ca17bee40cdc6339faf76f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 5 May 2026 11:09:31 +0000 Subject: [PATCH] Regenerate client from commit 313dab1 of spec repo --- .generator/schemas/v2/openapi.yaml | 406 ----------------- examples/v2/api-management/CreateOpenAPI.rb | 11 - examples/v2/api-management/DeleteOpenAPI.rb | 11 - examples/v2/api-management/GetOpenAPI.rb | 11 - examples/v2/api-management/ListAPIs.rb | 8 - examples/v2/api-management/UpdateOpenAPI.rb | 14 - features/scenarios_model_mapping.rb | 18 - features/v2/api_management.feature | 115 ----- features/v2/given.json | 12 - features/v2/undo.json | 37 -- lib/datadog_api_client/configuration.rb | 5 - lib/datadog_api_client/inflector.rb | 14 - .../v2/api/api_management_api.rb | 410 ------------------ .../v2/models/create_open_api_response.rb | 105 ----- .../create_open_api_response_attributes.rb | 107 ----- .../models/create_open_api_response_data.rb | 115 ----- .../v2/models/list_apis_response.rb | 117 ----- .../v2/models/list_apis_response_data.rb | 115 ----- .../list_apis_response_data_attributes.rb | 105 ----- .../v2/models/list_apis_response_meta.rb | 105 ----- .../list_apis_response_meta_pagination.rb | 125 ------ .../v2/models/open_api_endpoint.rb | 115 ----- .../v2/models/open_api_file.rb | 105 ----- .../v2/models/update_open_api_response.rb | 105 ----- .../update_open_api_response_attributes.rb | 107 ----- .../models/update_open_api_response_data.rb | 115 ----- 26 files changed, 2513 deletions(-) delete mode 100644 examples/v2/api-management/CreateOpenAPI.rb delete mode 100644 examples/v2/api-management/DeleteOpenAPI.rb delete mode 100644 examples/v2/api-management/GetOpenAPI.rb delete mode 100644 examples/v2/api-management/ListAPIs.rb delete mode 100644 examples/v2/api-management/UpdateOpenAPI.rb delete mode 100644 features/v2/api_management.feature delete mode 100644 lib/datadog_api_client/v2/api/api_management_api.rb delete mode 100644 lib/datadog_api_client/v2/models/create_open_api_response.rb delete mode 100644 lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/create_open_api_response_data.rb delete mode 100644 lib/datadog_api_client/v2/models/list_apis_response.rb delete mode 100644 lib/datadog_api_client/v2/models/list_apis_response_data.rb delete mode 100644 lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/list_apis_response_meta.rb delete mode 100644 lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb delete mode 100644 lib/datadog_api_client/v2/models/open_api_endpoint.rb delete mode 100644 lib/datadog_api_client/v2/models/open_api_file.rb delete mode 100644 lib/datadog_api_client/v2/models/update_open_api_response.rb delete mode 100644 lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/update_open_api_response_data.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 614a39995e8b..86acb3682c30 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4193,11 +4193,6 @@ components: AnyValueString: description: A scalar string value. type: string - ApiID: - description: API identifier. - example: "90646597-5fdb-4a17-a240-647003f8c028" - format: uuid - type: string ApmDependencyStatName: description: The APM dependency statistic to query. enum: @@ -16908,29 +16903,6 @@ components: required: - type type: object - CreateOpenAPIResponse: - description: Response for `CreateOpenAPI` operation. - properties: - data: - $ref: "#/components/schemas/CreateOpenAPIResponseData" - type: object - CreateOpenAPIResponseAttributes: - description: Attributes for `CreateOpenAPI`. - properties: - failed_endpoints: - description: List of endpoints which couldn't be parsed. - items: - $ref: "#/components/schemas/OpenAPIEndpoint" - type: array - type: object - CreateOpenAPIResponseData: - description: Data envelope for `CreateOpenAPIResponse`. - properties: - attributes: - $ref: "#/components/schemas/CreateOpenAPIResponseAttributes" - id: - $ref: "#/components/schemas/ApiID" - type: object CreateOrUpdateWidgetRequest: description: Request body for creating or updating a widget. properties: @@ -40455,58 +40427,6 @@ components: - first - last type: object - ListAPIsResponse: - description: Response for `ListAPIs`. - properties: - data: - description: List of API items. - items: - $ref: "#/components/schemas/ListAPIsResponseData" - type: array - meta: - $ref: "#/components/schemas/ListAPIsResponseMeta" - type: object - ListAPIsResponseData: - description: Data envelope for `ListAPIsResponse`. - properties: - attributes: - $ref: "#/components/schemas/ListAPIsResponseDataAttributes" - id: - $ref: "#/components/schemas/ApiID" - type: object - ListAPIsResponseDataAttributes: - description: Attributes for `ListAPIsResponseData`. - properties: - name: - description: API name. - example: "Payments API" - type: string - type: object - ListAPIsResponseMeta: - description: Metadata for `ListAPIsResponse`. - properties: - pagination: - $ref: "#/components/schemas/ListAPIsResponseMetaPagination" - type: object - ListAPIsResponseMetaPagination: - description: Pagination metadata information for `ListAPIsResponse`. - properties: - limit: - description: Number of items in the current page. - example: 20 - format: int64 - type: integer - offset: - description: Offset for pagination. - example: 0 - format: int64 - type: integer - total_count: - description: Total number of items. - example: 35 - format: int64 - type: integer - type: object ListAllocationsResponse: description: Response containing a list of targeting rules (allocations). properties: @@ -51598,24 +51518,6 @@ components: required: - type type: object - OpenAPIEndpoint: - description: Endpoint info extracted from an `OpenAPI` specification. - properties: - method: - description: The endpoint method. - type: string - path: - description: The endpoint path. - type: string - type: object - OpenAPIFile: - description: Object for API data in an `OpenAPI` format as a file. - properties: - openapi_spec_file: - description: Binary `OpenAPI` spec file - format: binary - type: string - type: object OpsgenieServiceCreateAttributes: description: The Opsgenie service attributes for a create request. properties: @@ -80330,29 +80232,6 @@ components: required: - type type: object - UpdateOpenAPIResponse: - description: Response for `UpdateOpenAPI`. - properties: - data: - $ref: "#/components/schemas/UpdateOpenAPIResponseData" - type: object - UpdateOpenAPIResponseAttributes: - description: Attributes for `UpdateOpenAPI`. - properties: - failed_endpoints: - description: List of endpoints which couldn't be parsed. - items: - $ref: "#/components/schemas/OpenAPIEndpoint" - type: array - type: object - UpdateOpenAPIResponseData: - description: Data envelope for `UpdateOpenAPIResponse`. - properties: - attributes: - $ref: "#/components/schemas/UpdateOpenAPIResponseAttributes" - id: - $ref: "#/components/schemas/ApiID" - type: object UpdateOutcomesAsyncAttributes: description: The JSON:API attributes for a batched set of scorecard outcomes. properties: @@ -86638,288 +86517,6 @@ paths: operator: OR permissions: - api_keys_write - /api/v2/apicatalog/api: - get: - deprecated: true - description: List APIs and their IDs. - operationId: ListAPIs - parameters: - - description: Filter APIs by name - in: query - name: query - required: false - schema: - example: "payments" - type: string - - description: Number of items per page. - in: query - name: page[limit] - required: false - schema: - default: 20 - format: int64 - minimum: 1 - type: integer - - description: Offset for pagination. - in: query - name: page[offset] - required: false - schema: - default: 0 - format: int64 - minimum: 0 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ListAPIsResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_read - summary: List APIs - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_read - x-unstable: |- - **Note**: This endpoint is deprecated. - /api/v2/apicatalog/api/{id}: - delete: - deprecated: true - description: Delete a specific API by ID. - operationId: DeleteOpenAPI - parameters: - - description: ID of the API to delete - in: path - name: id - required: true - schema: - $ref: "#/components/schemas/ApiID" - responses: - "204": - description: API deleted successfully - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: API not found error - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_write - summary: Delete an API - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_write - x-unstable: |- - **Note**: This endpoint is deprecated. - /api/v2/apicatalog/api/{id}/openapi: - get: - deprecated: true - description: Retrieve information about a specific API in [OpenAPI](https://spec.openapis.org/oas/latest.html) format file. - operationId: GetOpenAPI - parameters: - - description: ID of the API to retrieve - in: path - name: id - required: true - schema: - $ref: "#/components/schemas/ApiID" - responses: - "200": - content: - multipart/form-data: - schema: - format: binary - type: string - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: API not found error - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_read - summary: Get an API - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_read - x-unstable: |- - **Note**: This endpoint is deprecated. - put: - deprecated: true - description: |- - Update information about a specific API. The given content will replace all API content of the given ID. - The ID is returned by the create API, or can be found in the URL in the API catalog UI. - operationId: UpdateOpenAPI - parameters: - - description: ID of the API to modify - in: path - name: id - required: true - schema: - $ref: "#/components/schemas/ApiID" - requestBody: - content: - multipart/form-data: - examples: - default: - value: - openapi_spec_file: openapi-spec.yaml - schema: - $ref: "#/components/schemas/OpenAPIFile" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateOpenAPIResponse" - description: API updated successfully - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: API not found error - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_write - summary: Update an API - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_write - x-unstable: |- - **Note**: This endpoint is deprecated. - /api/v2/apicatalog/openapi: - post: - deprecated: true - description: |- - Create a new API from the [OpenAPI](https://spec.openapis.org/oas/latest.html) specification given. - See the [API Catalog documentation](https://docs.datadoghq.com/api_catalog/add_metadata/) for additional - information about the possible metadata. - It returns the created API ID. - operationId: CreateOpenAPI - requestBody: - content: - multipart/form-data: - examples: - default: - value: - openapi_spec_file: openapi-spec.yaml - schema: - $ref: "#/components/schemas/OpenAPIFile" - required: true - responses: - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/CreateOpenAPIResponse" - description: API created successfully - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_write - summary: Create a new API - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_write - x-unstable: |- - **Note**: This endpoint is deprecated. /api/v2/apm/config/metrics: get: description: Get the list of configured span-based metrics with their definitions. @@ -135233,9 +134830,6 @@ servers: default: api description: The subdomain where the API is deployed. tags: - - description: |- - Configure your API endpoints through the Datadog API. - name: API Management - description: Observe, troubleshoot, and improve cloud-scale applications with all telemetry in context name: APM - description: |- diff --git a/examples/v2/api-management/CreateOpenAPI.rb b/examples/v2/api-management/CreateOpenAPI.rb deleted file mode 100644 index f5cda3d70fa4..000000000000 --- a/examples/v2/api-management/CreateOpenAPI.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Create a new API returns "API created successfully" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_open_api".to_sym] = true -end -api_instance = DatadogAPIClient::V2::APIManagementAPI.new -opts = { - openapi_spec_file: File.open("openapi-spec.yaml", "r"), -} -p api_instance.create_open_api(opts) diff --git a/examples/v2/api-management/DeleteOpenAPI.rb b/examples/v2/api-management/DeleteOpenAPI.rb deleted file mode 100644 index aa79708063e8..000000000000 --- a/examples/v2/api-management/DeleteOpenAPI.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Delete an API returns "API deleted successfully" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_open_api".to_sym] = true -end -api_instance = DatadogAPIClient::V2::APIManagementAPI.new - -# there is a valid "managed_api" in the system -MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"] -api_instance.delete_open_api(MANAGED_API_DATA_ID) diff --git a/examples/v2/api-management/GetOpenAPI.rb b/examples/v2/api-management/GetOpenAPI.rb deleted file mode 100644 index dd3d5b890ead..000000000000 --- a/examples/v2/api-management/GetOpenAPI.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Get an API returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_open_api".to_sym] = true -end -api_instance = DatadogAPIClient::V2::APIManagementAPI.new - -# there is a valid "managed_api" in the system -MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"] -p api_instance.get_open_api(MANAGED_API_DATA_ID) diff --git a/examples/v2/api-management/ListAPIs.rb b/examples/v2/api-management/ListAPIs.rb deleted file mode 100644 index dd3a79f34b11..000000000000 --- a/examples/v2/api-management/ListAPIs.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List APIs returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_apis".to_sym] = true -end -api_instance = DatadogAPIClient::V2::APIManagementAPI.new -p api_instance.list_apis() diff --git a/examples/v2/api-management/UpdateOpenAPI.rb b/examples/v2/api-management/UpdateOpenAPI.rb deleted file mode 100644 index 322034d4b3a2..000000000000 --- a/examples/v2/api-management/UpdateOpenAPI.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Update an API returns "API updated successfully" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_open_api".to_sym] = true -end -api_instance = DatadogAPIClient::V2::APIManagementAPI.new - -# there is a valid "managed_api" in the system -MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"] -opts = { - openapi_spec_file: File.open("openapi-spec.yaml", "r"), -} -p api_instance.update_open_api(MANAGED_API_DATA_ID, opts) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index b65548d5207d..bc539fd5f336 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1266,24 +1266,6 @@ "pat_id" => "String", "body" => "PersonalAccessTokenUpdateRequest", }, - "v2.ListAPIs" => { - "query" => "String", - "page_limit" => "Integer", - "page_offset" => "Integer", - }, - "v2.DeleteOpenAPI" => { - "id" => "UUID", - }, - "v2.GetOpenAPI" => { - "id" => "UUID", - }, - "v2.UpdateOpenAPI" => { - "id" => "UUID", - "openapi_spec_file" => "File", - }, - "v2.CreateOpenAPI" => { - "openapi_spec_file" => "File", - }, "v2.CreateSpansMetric" => { "body" => "SpansMetricCreateRequest", }, diff --git a/features/v2/api_management.feature b/features/v2/api_management.feature deleted file mode 100644 index aefe9f319cce..000000000000 --- a/features/v2/api_management.feature +++ /dev/null @@ -1,115 +0,0 @@ -@endpoint(api-management) @endpoint(api-management-v2) -Feature: API Management - Configure your API endpoints through the Datadog API. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "APIManagement" API - - @integration-only @skip-terraform-config @skip-validation @team:DataDog/apm-aoe - Scenario: Create a new API returns "API created successfully" response - Given operation "CreateOpenAPI" enabled - And new "CreateOpenAPI" request - And request contains "openapi_spec_file" parameter with value "openapi-spec.yaml" - When the request is sent - Then the response status is 201 API created successfully - And the response "data.attributes.failed_endpoints" has length 0 - - @generated @skip @team:DataDog/apm-aoe - Scenario: Create a new API returns "Bad request" response - Given operation "CreateOpenAPI" enabled - And new "CreateOpenAPI" request - When the request is sent - Then the response status is 400 Bad request - - @integration-only @skip-terraform-config @skip-validation @team:DataDog/apm-aoe - Scenario: Delete an API returns "API deleted successfully" response - Given operation "DeleteOpenAPI" enabled - And there is a valid "managed_api" in the system - And new "DeleteOpenAPI" request - And request contains "id" parameter from "managed_api.data.id" - When the request is sent - Then the response status is 204 API deleted successfully - - @generated @skip @team:DataDog/apm-aoe - Scenario: Delete an API returns "API not found error" response - Given operation "DeleteOpenAPI" enabled - And new "DeleteOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 API not found error - - @generated @skip @team:DataDog/apm-aoe - Scenario: Delete an API returns "Bad request" response - Given operation "DeleteOpenAPI" enabled - And new "DeleteOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad request - - @generated @skip @team:DataDog/apm-aoe - Scenario: Get an API returns "API not found error" response - Given operation "GetOpenAPI" enabled - And new "GetOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 API not found error - - @generated @skip @team:DataDog/apm-aoe - Scenario: Get an API returns "Bad request" response - Given operation "GetOpenAPI" enabled - And new "GetOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad request - - @integration-only @skip-terraform-config @skip-validation @team:DataDog/apm-aoe - Scenario: Get an API returns "OK" response - Given operation "GetOpenAPI" enabled - And there is a valid "managed_api" in the system - And new "GetOpenAPI" request - And request contains "id" parameter from "managed_api.data.id" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/apm-aoe - Scenario: List APIs returns "Bad request" response - Given operation "ListAPIs" enabled - And new "ListAPIs" request - When the request is sent - Then the response status is 400 Bad request - - @generated @skip @team:DataDog/apm-aoe - Scenario: List APIs returns "OK" response - Given operation "ListAPIs" enabled - And new "ListAPIs" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/apm-aoe - Scenario: Update an API returns "API not found error" response - Given operation "UpdateOpenAPI" enabled - And new "UpdateOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 API not found error - - @integration-only @skip-terraform-config @skip-validation @team:DataDog/apm-aoe - Scenario: Update an API returns "API updated successfully" response - Given operation "UpdateOpenAPI" enabled - And there is a valid "managed_api" in the system - And new "UpdateOpenAPI" request - And request contains "id" parameter from "managed_api.data.id" - And request contains "openapi_spec_file" parameter with value "openapi-spec.yaml" - When the request is sent - Then the response status is 200 API updated successfully - And the response "data.attributes.failed_endpoints" has length 0 - - @generated @skip @team:DataDog/apm-aoe - Scenario: Update an API returns "Bad request" response - Given operation "UpdateOpenAPI" enabled - And new "UpdateOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad request diff --git a/features/v2/given.json b/features/v2/given.json index 98e2edab7a17..6ad08f5eddde 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -104,18 +104,6 @@ "tag": "Key Management", "operationId": "CreateAPIKey" }, - { - "parameters": [ - { - "name": "openapi_spec_file", - "value": "\"openapi-spec.yaml\"" - } - ], - "step": "there is a valid \"managed_api\" in the system", - "key": "managed_api", - "tag": "API Management", - "operationId": "CreateOpenAPI" - }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index 21d7896f03bd..3456c24457e5 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -454,43 +454,6 @@ "type": "idempotent" } }, - "ListAPIs": { - "tag": "API Management", - "undo": { - "type": "safe" - } - }, - "DeleteOpenAPI": { - "tag": "API Management", - "undo": { - "type": "idempotent" - } - }, - "GetOpenAPI": { - "tag": "API Management", - "undo": { - "type": "safe" - } - }, - "UpdateOpenAPI": { - "tag": "API Management", - "undo": { - "type": "idempotent" - } - }, - "CreateOpenAPI": { - "tag": "API Management", - "undo": { - "operationId": "DeleteOpenAPI", - "parameters": [ - { - "name": "id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, "ListSpansMetrics": { "tag": "Spans Metrics", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index eb82106f5652..8fcf382dc3dc 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -237,11 +237,6 @@ def initialize "v2.update_llm_obs_experiment": false, "v2.update_llm_obs_project": false, "v2.anonymize_users": false, - "v2.create_open_api": false, - "v2.delete_open_api": false, - "v2.get_open_api": false, - "v2.list_apis": false, - "v2.update_open_api": false, "v2.get_investigation": false, "v2.list_investigations": false, "v2.trigger_investigation": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 8d3dc51e5100..6b1fba4981be 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2062,9 +2062,6 @@ def overrides "v2.create_notification_rule_parameters_data_attributes" => "CreateNotificationRuleParametersDataAttributes", "v2.create_on_call_notification_rule_request" => "CreateOnCallNotificationRuleRequest", "v2.create_on_call_notification_rule_request_data" => "CreateOnCallNotificationRuleRequestData", - "v2.create_open_api_response" => "CreateOpenAPIResponse", - "v2.create_open_api_response_attributes" => "CreateOpenAPIResponseAttributes", - "v2.create_open_api_response_data" => "CreateOpenAPIResponseData", "v2.create_or_update_widget_request" => "CreateOrUpdateWidgetRequest", "v2.create_or_update_widget_request_attributes" => "CreateOrUpdateWidgetRequestAttributes", "v2.create_or_update_widget_request_data" => "CreateOrUpdateWidgetRequestData", @@ -3418,11 +3415,6 @@ def overrides "v2.library" => "Library", "v2.links" => "Links", "v2.list_allocations_response" => "ListAllocationsResponse", - "v2.list_apis_response" => "ListAPIsResponse", - "v2.list_apis_response_data" => "ListAPIsResponseData", - "v2.list_apis_response_data_attributes" => "ListAPIsResponseDataAttributes", - "v2.list_apis_response_meta" => "ListAPIsResponseMeta", - "v2.list_apis_response_meta_pagination" => "ListAPIsResponseMetaPagination", "v2.list_app_key_registrations_response" => "ListAppKeyRegistrationsResponse", "v2.list_app_key_registrations_response_meta" => "ListAppKeyRegistrationsResponseMeta", "v2.list_application_keys_response" => "ListApplicationKeysResponse", @@ -4294,8 +4286,6 @@ def overrides "v2.open_ai_integration" => "OpenAIIntegration", "v2.open_ai_integration_type" => "OpenAIIntegrationType", "v2.open_ai_integration_update" => "OpenAIIntegrationUpdate", - "v2.open_api_endpoint" => "OpenAPIEndpoint", - "v2.open_api_file" => "OpenAPIFile", "v2.opsgenie_service_create_attributes" => "OpsgenieServiceCreateAttributes", "v2.opsgenie_service_create_data" => "OpsgenieServiceCreateData", "v2.opsgenie_service_create_request" => "OpsgenieServiceCreateRequest", @@ -6141,9 +6131,6 @@ def overrides "v2.update_on_call_notification_rule_request" => "UpdateOnCallNotificationRuleRequest", "v2.update_on_call_notification_rule_request_attributes" => "UpdateOnCallNotificationRuleRequestAttributes", "v2.update_on_call_notification_rule_request_data" => "UpdateOnCallNotificationRuleRequestData", - "v2.update_open_api_response" => "UpdateOpenAPIResponse", - "v2.update_open_api_response_attributes" => "UpdateOpenAPIResponseAttributes", - "v2.update_open_api_response_data" => "UpdateOpenAPIResponseData", "v2.update_outcomes_async_attributes" => "UpdateOutcomesAsyncAttributes", "v2.update_outcomes_async_request" => "UpdateOutcomesAsyncRequest", "v2.update_outcomes_async_request_data" => "UpdateOutcomesAsyncRequestData", @@ -6370,7 +6357,6 @@ def overrides "v2.action_connection_api" => "ActionConnectionAPI", "v2.actions_datastores_api" => "ActionsDatastoresAPI", "v2.agentless_scanning_api" => "AgentlessScanningAPI", - "v2.api_management_api" => "APIManagementAPI", "v2.apm_api" => "APMAPI", "v2.apm_retention_filters_api" => "APMRetentionFiltersAPI", "v2.app_builder_api" => "AppBuilderAPI", diff --git a/lib/datadog_api_client/v2/api/api_management_api.rb b/lib/datadog_api_client/v2/api/api_management_api.rb deleted file mode 100644 index 65c39c0d7502..000000000000 --- a/lib/datadog_api_client/v2/api/api_management_api.rb +++ /dev/null @@ -1,410 +0,0 @@ -=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 'cgi' - -module DatadogAPIClient::V2 - class APIManagementAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Create a new API. - # - # @see #create_open_api_with_http_info - def create_open_api(opts = {}) - data, _status_code, _headers = create_open_api_with_http_info(opts) - data - end - - # Create a new API. - # - # Create a new API from the [OpenAPI](https://spec.openapis.org/oas/latest.html) specification given. - # See the [API Catalog documentation](https://docs.datadoghq.com/api_catalog/add_metadata/) for additional - # information about the possible metadata. - # It returns the created API ID. - # - # @deprecated This API is deprecated. - # - # @param opts [Hash] the optional parameters - # @option opts [File] :openapi_spec_file Binary `OpenAPI` spec file - # @return [Array<(CreateOpenAPIResponse, Integer, Hash)>] CreateOpenAPIResponse data, response status code and response headers - def create_open_api_with_http_info(opts = {}) - warn "[DEPRECATION] `CreateOpenAPI` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.create_open_api".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_open_api") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_open_api")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: APIManagementAPI.create_open_api ...' - end - # resource path - local_var_path = '/api/v2/apicatalog/openapi' - - # 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']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) - - # form parameters - form_params = opts[:form_params] || {} - form_params['openapi_spec_file'] = opts[:'openapi_spec_file'] if !opts[:'openapi_spec_file'].nil? - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CreateOpenAPIResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_open_api, - :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::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: APIManagementAPI#create_open_api\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete an API. - # - # @see #delete_open_api_with_http_info - def delete_open_api(id, opts = {}) - delete_open_api_with_http_info(id, opts) - nil - end - - # Delete an API. - # - # Delete a specific API by ID. - # - # @deprecated This API is deprecated. - # - # @param id [UUID] ID of the API to delete - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_open_api_with_http_info(id, opts = {}) - warn "[DEPRECATION] `DeleteOpenAPI` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.delete_open_api".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_open_api") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_open_api")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: APIManagementAPI.delete_open_api ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling APIManagementAPI.delete_open_api" - end - # resource path - local_var_path = '/api/v2/apicatalog/api/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_open_api, - :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::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: APIManagementAPI#delete_open_api\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get an API. - # - # @see #get_open_api_with_http_info - def get_open_api(id, opts = {}) - data, _status_code, _headers = get_open_api_with_http_info(id, opts) - data - end - - # Get an API. - # - # Retrieve information about a specific API in [OpenAPI](https://spec.openapis.org/oas/latest.html) format file. - # - # @deprecated This API is deprecated. - # - # @param id [UUID] ID of the API to retrieve - # @param opts [Hash] the optional parameters - # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers - def get_open_api_with_http_info(id, opts = {}) - warn "[DEPRECATION] `GetOpenAPI` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.get_open_api".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_open_api") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_open_api")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: APIManagementAPI.get_open_api ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling APIManagementAPI.get_open_api" - end - # resource path - local_var_path = '/api/v2/apicatalog/api/{id}/openapi'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) - - # 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(['multipart/form-data', '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] || 'File' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_open_api, - :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: APIManagementAPI#get_open_api\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List APIs. - # - # @see #list_apis_with_http_info - def list_apis(opts = {}) - data, _status_code, _headers = list_apis_with_http_info(opts) - data - end - - # List APIs. - # - # List APIs and their IDs. - # - # @deprecated This API is deprecated. - # - # @param opts [Hash] the optional parameters - # @option opts [String] :query Filter APIs by name - # @option opts [Integer] :page_limit Number of items per page. - # @option opts [Integer] :page_offset Offset for pagination. - # @return [Array<(ListAPIsResponse, Integer, Hash)>] ListAPIsResponse data, response status code and response headers - def list_apis_with_http_info(opts = {}) - warn "[DEPRECATION] `ListAPIs` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.list_apis".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_apis") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_apis")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: APIManagementAPI.list_apis ...' - end - if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1 - fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling APIManagementAPI.list_apis, must be greater than or equal to 1.' - end - if @api_client.config.client_side_validation && !opts[:'page_offset'].nil? && opts[:'page_offset'] < 0 - fail ArgumentError, 'invalid value for "opts[:"page_offset"]" when calling APIManagementAPI.list_apis, must be greater than or equal to 0.' - end - # resource path - local_var_path = '/api/v2/apicatalog/api' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? - query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? - query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? - - # 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] || 'ListAPIsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_apis, - :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: APIManagementAPI#list_apis\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update an API. - # - # @see #update_open_api_with_http_info - def update_open_api(id, opts = {}) - data, _status_code, _headers = update_open_api_with_http_info(id, opts) - data - end - - # Update an API. - # - # Update information about a specific API. The given content will replace all API content of the given ID. - # The ID is returned by the create API, or can be found in the URL in the API catalog UI. - # - # @deprecated This API is deprecated. - # - # @param id [UUID] ID of the API to modify - # @param opts [Hash] the optional parameters - # @option opts [File] :openapi_spec_file Binary `OpenAPI` spec file - # @return [Array<(UpdateOpenAPIResponse, Integer, Hash)>] UpdateOpenAPIResponse data, response status code and response headers - def update_open_api_with_http_info(id, opts = {}) - warn "[DEPRECATION] `UpdateOpenAPI` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.update_open_api".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_open_api") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_open_api")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: APIManagementAPI.update_open_api ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling APIManagementAPI.update_open_api" - end - # resource path - local_var_path = '/api/v2/apicatalog/api/{id}/openapi'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) - - # 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']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) - - # form parameters - form_params = opts[:form_params] || {} - form_params['openapi_spec_file'] = opts[:'openapi_spec_file'] if !opts[:'openapi_spec_file'].nil? - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UpdateOpenAPIResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_open_api, - :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::Put, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: APIManagementAPI#update_open_api\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/datadog_api_client/v2/models/create_open_api_response.rb b/lib/datadog_api_client/v2/models/create_open_api_response.rb deleted file mode 100644 index 07b2e180c4fe..000000000000 --- a/lib/datadog_api_client/v2/models/create_open_api_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 for `CreateOpenAPI` operation. - class CreateOpenAPIResponse - include BaseGenericModel - - # Data envelope for `CreateOpenAPIResponse`. - attr_accessor :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' => :'CreateOpenAPIResponseData' - } - 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::CreateOpenAPIResponse` 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 - - # 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 diff --git a/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb b/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb deleted file mode 100644 index 207ddf88472b..000000000000 --- a/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb +++ /dev/null @@ -1,107 +0,0 @@ -=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 for `CreateOpenAPI`. - class CreateOpenAPIResponseAttributes - include BaseGenericModel - - # List of endpoints which couldn't be parsed. - attr_accessor :failed_endpoints - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'failed_endpoints' => :'failed_endpoints' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'failed_endpoints' => :'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::CreateOpenAPIResponseAttributes` 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?(:'failed_endpoints') - if (value = attributes[:'failed_endpoints']).is_a?(Array) - self.failed_endpoints = value - end - 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 && - failed_endpoints == o.failed_endpoints && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [failed_endpoints, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/create_open_api_response_data.rb b/lib/datadog_api_client/v2/models/create_open_api_response_data.rb deleted file mode 100644 index 747d4bf18bc3..000000000000 --- a/lib/datadog_api_client/v2/models/create_open_api_response_data.rb +++ /dev/null @@ -1,115 +0,0 @@ -=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 envelope for `CreateOpenAPIResponse`. - class CreateOpenAPIResponseData - include BaseGenericModel - - # Attributes for `CreateOpenAPI`. - attr_accessor :attributes - - # API identifier. - attr_accessor :id - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CreateOpenAPIResponseAttributes', - :'id' => :'UUID' - } - 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::CreateOpenAPIResponseData` 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 - 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 && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/list_apis_response.rb b/lib/datadog_api_client/v2/models/list_apis_response.rb deleted file mode 100644 index 095473a0453b..000000000000 --- a/lib/datadog_api_client/v2/models/list_apis_response.rb +++ /dev/null @@ -1,117 +0,0 @@ -=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 for `ListAPIs`. - class ListAPIsResponse - include BaseGenericModel - - # List of API items. - attr_accessor :data - - # Metadata for `ListAPIsResponse`. - attr_accessor :meta - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data', - :'meta' => :'meta' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array', - :'meta' => :'ListAPIsResponseMeta' - } - 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::ListAPIsResponse` 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') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - 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 && - data == o.data && - meta == o.meta && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, meta, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/list_apis_response_data.rb b/lib/datadog_api_client/v2/models/list_apis_response_data.rb deleted file mode 100644 index 0f0c7e7629da..000000000000 --- a/lib/datadog_api_client/v2/models/list_apis_response_data.rb +++ /dev/null @@ -1,115 +0,0 @@ -=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 envelope for `ListAPIsResponse`. - class ListAPIsResponseData - include BaseGenericModel - - # Attributes for `ListAPIsResponseData`. - attr_accessor :attributes - - # API identifier. - attr_accessor :id - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'ListAPIsResponseDataAttributes', - :'id' => :'UUID' - } - 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::ListAPIsResponseData` 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 - 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 && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb b/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb deleted file mode 100644 index c7efde9be391..000000000000 --- a/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 for `ListAPIsResponseData`. - class ListAPIsResponseDataAttributes - include BaseGenericModel - - # API name. - attr_accessor :name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'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::ListAPIsResponseDataAttributes` 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?(:'name') - self.name = attributes[:'name'] - 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 && - name == o.name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/list_apis_response_meta.rb b/lib/datadog_api_client/v2/models/list_apis_response_meta.rb deleted file mode 100644 index b33d5351d5d7..000000000000 --- a/lib/datadog_api_client/v2/models/list_apis_response_meta.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 - # Metadata for `ListAPIsResponse`. - class ListAPIsResponseMeta - include BaseGenericModel - - # Pagination metadata information for `ListAPIsResponse`. - attr_accessor :pagination - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'pagination' => :'pagination' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'pagination' => :'ListAPIsResponseMetaPagination' - } - 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::ListAPIsResponseMeta` 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?(:'pagination') - self.pagination = attributes[:'pagination'] - 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 && - pagination == o.pagination && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [pagination, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb b/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb deleted file mode 100644 index c09e3f1188d4..000000000000 --- a/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb +++ /dev/null @@ -1,125 +0,0 @@ -=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 - # Pagination metadata information for `ListAPIsResponse`. - class ListAPIsResponseMetaPagination - include BaseGenericModel - - # Number of items in the current page. - attr_accessor :limit - - # Offset for pagination. - attr_accessor :offset - - # Total number of items. - attr_accessor :total_count - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'limit' => :'limit', - :'offset' => :'offset', - :'total_count' => :'total_count' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'limit' => :'Integer', - :'offset' => :'Integer', - :'total_count' => :'Integer' - } - 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::ListAPIsResponseMetaPagination` 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?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.key?(:'offset') - self.offset = attributes[:'offset'] - end - - if attributes.key?(:'total_count') - self.total_count = attributes[:'total_count'] - 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 && - limit == o.limit && - offset == o.offset && - total_count == o.total_count && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [limit, offset, total_count, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/open_api_endpoint.rb b/lib/datadog_api_client/v2/models/open_api_endpoint.rb deleted file mode 100644 index 6aa3e482dc6d..000000000000 --- a/lib/datadog_api_client/v2/models/open_api_endpoint.rb +++ /dev/null @@ -1,115 +0,0 @@ -=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 - # Endpoint info extracted from an `OpenAPI` specification. - class OpenAPIEndpoint - include BaseGenericModel - - # The endpoint method. - attr_accessor :method - - # The endpoint path. - attr_accessor :path - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'method' => :'method', - :'path' => :'path' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'method' => :'String', - :'path' => :'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::OpenAPIEndpoint` 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?(:'method') - self.method = attributes[:'method'] - end - - if attributes.key?(:'path') - self.path = attributes[:'path'] - 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 && - method == o.method && - path == o.path && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [method, path, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/open_api_file.rb b/lib/datadog_api_client/v2/models/open_api_file.rb deleted file mode 100644 index 10c3ee705296..000000000000 --- a/lib/datadog_api_client/v2/models/open_api_file.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 - # Object for API data in an `OpenAPI` format as a file. - class OpenAPIFile - include BaseGenericModel - - # Binary `OpenAPI` spec file - attr_accessor :openapi_spec_file - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'openapi_spec_file' => :'openapi_spec_file' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'openapi_spec_file' => :'File' - } - 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::OpenAPIFile` 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?(:'openapi_spec_file') - self.openapi_spec_file = attributes[:'openapi_spec_file'] - 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 && - openapi_spec_file == o.openapi_spec_file && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [openapi_spec_file, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/update_open_api_response.rb b/lib/datadog_api_client/v2/models/update_open_api_response.rb deleted file mode 100644 index 0ac717af3bd6..000000000000 --- a/lib/datadog_api_client/v2/models/update_open_api_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 for `UpdateOpenAPI`. - class UpdateOpenAPIResponse - include BaseGenericModel - - # Data envelope for `UpdateOpenAPIResponse`. - attr_accessor :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' => :'UpdateOpenAPIResponseData' - } - 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::UpdateOpenAPIResponse` 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 - - # 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 diff --git a/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb b/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb deleted file mode 100644 index df6b9886fd90..000000000000 --- a/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb +++ /dev/null @@ -1,107 +0,0 @@ -=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 for `UpdateOpenAPI`. - class UpdateOpenAPIResponseAttributes - include BaseGenericModel - - # List of endpoints which couldn't be parsed. - attr_accessor :failed_endpoints - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'failed_endpoints' => :'failed_endpoints' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'failed_endpoints' => :'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::UpdateOpenAPIResponseAttributes` 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?(:'failed_endpoints') - if (value = attributes[:'failed_endpoints']).is_a?(Array) - self.failed_endpoints = value - end - 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 && - failed_endpoints == o.failed_endpoints && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [failed_endpoints, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/update_open_api_response_data.rb b/lib/datadog_api_client/v2/models/update_open_api_response_data.rb deleted file mode 100644 index 7475c8b3271d..000000000000 --- a/lib/datadog_api_client/v2/models/update_open_api_response_data.rb +++ /dev/null @@ -1,115 +0,0 @@ -=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 envelope for `UpdateOpenAPIResponse`. - class UpdateOpenAPIResponseData - include BaseGenericModel - - # Attributes for `UpdateOpenAPI`. - attr_accessor :attributes - - # API identifier. - attr_accessor :id - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'UpdateOpenAPIResponseAttributes', - :'id' => :'UUID' - } - 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::UpdateOpenAPIResponseData` 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 - 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 && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, additional_properties].hash - end - end -end