From 3aa38978c1c85c394868377fbed852cfd82e570c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 10 Oct 2022 16:37:24 +0000 Subject: [PATCH 1/4] Regenerate client from commit 49db3b7a of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 567 ++++++++++++++++++ ...definition-returns-CREATED-response.frozen | 1 + ...ce-definition-returns-CREATED-response.yml | 49 ++ ...finition-returns-Not-Found-response.frozen | 1 + ...-definition-returns-Not-Found-response.yml | 22 + ...vice-definition-returns-OK-response.frozen | 1 + ...service-definition-returns-OK-response.yml | 66 ++ ...finition-returns-Not-Found-response.frozen | 1 + ...-definition-returns-Not-Found-response.yml | 22 + ...vice-definition-returns-OK-response.frozen | 1 + ...service-definition-returns-OK-response.yml | 70 +++ ...ice-definitions-returns-OK-response.frozen | 1 + ...ervice-definitions-returns-OK-response.yml | 378 ++++++++++++ .../CreateOrUpdateServiceDefinitions.rb | 52 ++ .../DeleteServiceDefinition.rb | 5 + .../GetServiceDefinition.rb | 5 + .../ListServiceDefinitions.rb | 5 + features/scenarios_model_mapping.rb | 9 + features/v2/given.json | 12 + features/v2/service_definition.feature | 91 +++ features/v2/undo.json | 31 + lib/datadog_api_client/inflector.rb | 31 + .../v2/api/service_definition_api.rb | 283 +++++++++ .../v2/models/service_definition_data.rb | 121 ++++ .../service_definition_data_attributes.rb | 121 ++++ .../models/service_definition_get_response.rb | 111 ++++ .../service_definition_list_response.rb | 113 ++++ .../v2/models/service_definition_meta.rb | 141 +++++ .../v2/models/service_definition_schema.rb | 63 ++ .../v2/models/service_definition_v1.rb | 207 +++++++ .../models/service_definition_v1_contact.rb | 121 ++++ .../v2/models/service_definition_v1_info.rb | 152 +++++ .../service_definition_v1_integrations.rb | 111 ++++ .../v2/models/service_definition_v1_org.rb | 121 ++++ .../models/service_definition_v1_resource.rb | 164 +++++ .../service_definition_v1_resource_type.rb | 34 ++ .../models/service_definition_v1_version.rb | 26 + .../v2/models/service_definition_v2.rb | 243 ++++++++ .../models/service_definition_v2_contact.rb | 63 ++ .../v2/models/service_definition_v2_doc.rb | 153 +++++ .../v2/models/service_definition_v2_email.rb | 153 +++++ .../service_definition_v2_email_type.rb | 26 + .../service_definition_v2_integrations.rb | 121 ++++ .../v2/models/service_definition_v2_link.rb | 164 +++++ .../models/service_definition_v2_link_type.rb | 34 ++ .../models/service_definition_v2_opsgenie.rb | 132 ++++ .../service_definition_v2_opsgenie_region.rb | 27 + .../v2/models/service_definition_v2_repo.rb | 153 +++++ .../v2/models/service_definition_v2_slack.rb | 153 +++++ .../service_definition_v2_slack_type.rb | 26 + .../models/service_definition_v2_version.rb | 26 + .../service_definitions_create_request.rb | 63 ++ .../service_definitions_create_response.rb | 113 ++++ 54 files changed, 4964 insertions(+), 4 deletions(-) create mode 100644 cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.frozen create mode 100644 cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.yml create mode 100644 cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.frozen create mode 100644 cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.yml create mode 100644 cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.frozen create mode 100644 cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.yml create mode 100644 cassettes/features/v2/service_definition/Get-all-service-definitions-returns-OK-response.frozen create mode 100644 cassettes/features/v2/service_definition/Get-all-service-definitions-returns-OK-response.yml create mode 100644 examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb create mode 100644 examples/v2/service-definition/DeleteServiceDefinition.rb create mode 100644 examples/v2/service-definition/GetServiceDefinition.rb create mode 100644 examples/v2/service-definition/ListServiceDefinitions.rb create mode 100644 features/v2/service_definition.feature create mode 100644 lib/datadog_api_client/v2/api/service_definition_api.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_data.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_get_response.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_list_response.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_meta.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_schema.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v1.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v1_contact.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v1_info.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v1_org.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v1_resource.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v1_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v1_version.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_contact.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_doc.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_email.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_email_type.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_link.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_link_type.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_opsgenie_region.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_repo.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_slack.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_slack_type.rb create mode 100644 lib/datadog_api_client/v2/models/service_definition_v2_version.rb create mode 100644 lib/datadog_api_client/v2/models/service_definitions_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/service_definitions_create_response.rb diff --git a/.apigentools-info b/.apigentools-info index aa0d4134d8b1..bd5d69872531 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2022-10-07 18:45:12.407783", - "spec_repo_commit": "e5a0f5b3" + "regenerated": "2022-10-10 16:37:03.989417", + "spec_repo_commit": "49db3b7a" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2022-10-07 18:45:12.421589", - "spec_repo_commit": "e5a0f5b3" + "regenerated": "2022-10-10 16:37:04.001409", + "spec_repo_commit": "49db3b7a" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6a804e1693f3..2f96dba665fa 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -310,6 +310,14 @@ components: schema: example: 00000000-0000-1234-0000-000000000000 type: string + ServiceName: + description: The name of the service. + in: path + name: service_name + required: true + schema: + example: my-service + type: string SignalID: description: The ID of the signal. in: path @@ -8371,6 +8379,468 @@ components: required: - data type: object + ServiceDefinitionData: + description: Service definition data. + properties: + attributes: + $ref: '#/components/schemas/ServiceDefinitionDataAttributes' + type: + description: Service definition type. + type: string + type: object + ServiceDefinitionDataAttributes: + description: Service definition attributes. + properties: + meta: + $ref: '#/components/schemas/ServiceDefinitionMeta' + schema: + $ref: '#/components/schemas/ServiceDefinitionSchema' + type: object + ServiceDefinitionGetResponse: + description: Get service definition response. + properties: + data: + $ref: '#/components/schemas/ServiceDefinitionData' + type: object + ServiceDefinitionListResponse: + description: Get service definitions response. + properties: + data: + description: Get service definitions response payload. + items: + $ref: '#/components/schemas/ServiceDefinitionData' + type: array + type: object + ServiceDefinitionMeta: + description: Metadata about a service definition. + properties: + github-html-url: + description: GitHub HTML URL. + type: string + ingested-schema-version: + description: Ingestion schema version. + type: string + ingestion-source: + description: Ingestion source of the service definition. + type: string + last-modified-time: + description: Last modified time of the service definition. + type: string + type: object + ServiceDefinitionRaw: + description: Service Definition in raw JSON/YAML representation. + example: '--- + + schema-version: v2 + + dd-service: my-service + + ' + type: string + ServiceDefinitionSchema: + description: Service definition schema. + oneOf: + - $ref: '#/components/schemas/ServiceDefinitionV1' + - $ref: '#/components/schemas/ServiceDefinitionV2' + type: object + ServiceDefinitionV1: + deprecated: true + description: Deprecated - Service definition V1 for providing additional service + metadata and integrations. + properties: + contact: + $ref: '#/components/schemas/ServiceDefinitionV1Contact' + extensions: + additionalProperties: {} + description: Extensions to V1 schema. + example: + myorg/extension: extensionValue + type: object + external-resources: + description: A list of external links related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV1Resource' + type: array + info: + $ref: '#/components/schemas/ServiceDefinitionV1Info' + integrations: + $ref: '#/components/schemas/ServiceDefinitionV1Integrations' + org: + $ref: '#/components/schemas/ServiceDefinitionV1Org' + schema-version: + $ref: '#/components/schemas/ServiceDefinitionV1Version' + tags: + description: A set of custom tags. + example: + - my:tag + - service:tag + items: + type: string + type: array + required: + - schema-version + - info + type: object + ServiceDefinitionV1Contact: + description: Contact information about the service. + properties: + email: + description: "Service owner\u2019s email." + example: contact@datadoghq.com + format: email + type: string + slack: + description: "Service owner\u2019s slack channel." + example: https://yourcompany.slack.com/archives/channel123 + type: string + ServiceDefinitionV1Info: + description: Basic information about a service. + properties: + dd-service: + description: Unique identifier of the service. Must be unique across all + services and is used to match with a service in Datadog. + example: myservice + type: string + description: + description: A short description of the service. + example: A shopping cart service + type: string + display-name: + description: A friendly name of the service. + example: My Service + type: string + service-tier: + description: Service tier. + example: Tier 1 + type: string + required: + - dd-service + type: object + ServiceDefinitionV1Integrations: + description: Third party integrations that Datadog supports. + properties: + pagerduty: + $ref: '#/components/schemas/ServiceDefinitionV1Pagerduty' + type: object + ServiceDefinitionV1Org: + description: Org related information about the service. + properties: + application: + description: App feature for which this service supports. + example: E-Commerce + type: string + team: + description: Team that owns the service. + example: my-team + type: string + type: object + ServiceDefinitionV1Pagerduty: + description: PagerDuty service url for the service. + example: https://my-org.pagerduty.com/service-directory/PMyService + type: string + ServiceDefinitionV1Resource: + description: Service's external links. + properties: + name: + description: Link name. + example: Runbook + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV1ResourceType' + url: + description: Link URL. + example: https://my-runbook + type: string + required: + - name + - type + - url + type: object + ServiceDefinitionV1ResourceType: + description: Link type. + enum: + - doc + - wiki + - runbook + - url + - repo + - dashboard + - oncall + - code + - link + example: runbook + type: string + x-enum-varnames: + - DOC + - WIKI + - RUNBOOK + - URL + - REPO + - DASHBOARD + - ONCALL + - CODE + - LINK + ServiceDefinitionV1Version: + default: v1 + description: Schema version being used. + enum: + - v1 + example: v1 + type: string + x-enum-varnames: + - v1 + ServiceDefinitionV2: + description: Service definition V2 for providing service metadata and integrations. + properties: + contacts: + description: A list of contacts related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Contact' + type: array + dd-service: + description: Unique identifier of the service. Must be unique across all + services and is used to match with a service in Datadog. + example: my-service + type: string + dd-team: + description: Experimental feature. A Team handle that matches a Team in + the Datadog Teams product. + example: my-team + type: string + docs: + description: A list of documentation related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Doc' + type: array + extensions: + additionalProperties: {} + description: Extensions to V2 schema. + example: + myorg/extension: extensionValue + type: object + integrations: + $ref: '#/components/schemas/ServiceDefinitionV2Integrations' + links: + description: A list of links related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Link' + type: array + repos: + description: A list of code repositories related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Repo' + type: array + schema-version: + $ref: '#/components/schemas/ServiceDefinitionV2Version' + tags: + description: A set of custom tags. + example: + - my:tag + - service:tag + items: + type: string + type: array + team: + description: Team that owns the service. + example: my-team + type: string + required: + - schema-version + - dd-service + type: object + ServiceDefinitionV2Contact: + description: Service owner's contacts information. + oneOf: + - $ref: '#/components/schemas/ServiceDefinitionV2Email' + - $ref: '#/components/schemas/ServiceDefinitionV2Slack' + ServiceDefinitionV2Doc: + description: Service documents. + properties: + name: + description: Document name. + example: Architecture + type: string + provider: + description: Document provider. + example: google drive + type: string + url: + description: Document URL. + example: https://gdrive/mydoc + type: string + required: + - name + - url + type: object + ServiceDefinitionV2Email: + description: Service owner's email. + properties: + contact: + description: Contact value. + example: contact@datadoghq.com + format: email + type: string + name: + description: Contact email. + example: Team Email + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2EmailType' + required: + - type + - contact + type: object + ServiceDefinitionV2EmailType: + description: Contact type. + enum: + - email + example: email + type: string + x-enum-varnames: + - EMAIL + ServiceDefinitionV2Integrations: + description: Third party integrations that Datadog supports. + properties: + opsgenie: + $ref: '#/components/schemas/ServiceDefinitionV2Opsgenie' + pagerduty: + $ref: '#/components/schemas/ServiceDefinitionV2Pagerduty' + type: object + ServiceDefinitionV2Link: + description: Service's external links. + properties: + name: + description: Link name. + example: Runbook + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2LinkType' + url: + description: Link URL. + example: https://my-runbook + type: string + required: + - name + - type + - url + type: object + ServiceDefinitionV2LinkType: + description: Link type. + enum: + - doc + - wiki + - runbook + - url + - repo + - dashboard + - oncall + - code + - link + example: runbook + type: string + x-enum-varnames: + - DOC + - WIKI + - RUNBOOK + - URL + - REPO + - DASHBOARD + - ONCALL + - CODE + - LINK + ServiceDefinitionV2Opsgenie: + description: Opsgenie integration for the service. + properties: + region: + $ref: '#/components/schemas/ServiceDefinitionV2OpsgenieRegion' + service-id: + description: Opsgenie service id. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + required: + - service-id + type: object + ServiceDefinitionV2OpsgenieRegion: + description: Opsgenie instance region. + enum: + - US + - EU + example: US + type: string + x-enum-varnames: + - US + - EU + ServiceDefinitionV2Pagerduty: + description: PagerDuty service URL for the service. + example: https://my-org.pagerduty.com/service-directory/PMyService + type: string + ServiceDefinitionV2Repo: + description: Service code repositories. + properties: + name: + description: Repository name. + example: Source Code + type: string + provider: + description: Repository provider. + example: GitHub + type: string + url: + description: Repository URL. + example: https://github.com/DataDog/schema + type: string + required: + - name + - url + type: object + ServiceDefinitionV2Slack: + description: Service owner's slack channel. + properties: + contact: + description: Slack Channel. + example: https://yourcompany.slack.com/archives/channel123 + type: string + name: + description: Contact Slack. + example: Team Slack + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2SlackType' + required: + - type + - contact + type: object + ServiceDefinitionV2SlackType: + description: Contact type. + enum: + - slack + example: slack + type: string + x-enum-varnames: + - SLACK + ServiceDefinitionV2Version: + default: v2 + description: Schema version being used. + enum: + - v2 + example: v2 + type: string + x-enum-varnames: + - V2 + ServiceDefinitionsCreateRequest: + description: Create service definitions request. + oneOf: + - $ref: '#/components/schemas/ServiceDefinitionV2' + - $ref: '#/components/schemas/ServiceDefinitionRaw' + ServiceDefinitionsCreateResponse: + description: Create service definitions response. + properties: + data: + description: Data representing service definitions. + items: + $ref: '#/components/schemas/ServiceDefinitionData' + type: array + type: object UsageApplicationSecurityMonitoringResponse: description: Application Security Monitoring usage response. properties: @@ -13920,6 +14390,99 @@ paths: x-unstable: '**Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/services/definitions: + get: + description: Get a list of all service definitions from the Datadog Service + Catalog. + operationId: ListServiceDefinitions + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDefinitionsCreateResponse' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all service definitions + tags: + - Service Definition + post: + description: Create or update service definition in the Datadog Service Catalog. + operationId: CreateOrUpdateServiceDefinitions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDefinitionsCreateRequest' + description: Service Definition YAML/JSON. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDefinitionListResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create or update service definition + tags: + - Service Definition + x-codegen-request-body-name: body + /api/v2/services/definitions/{service_name}: + delete: + description: Delete a single service definition in the Datadog Service Catalog. + operationId: DeleteServiceDefinition + parameters: + - $ref: '#/components/parameters/ServiceName' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a single service definition + tags: + - Service Definition + get: + description: Get a single service definition from the Datadog Service Catalog. + operationId: GetServiceDefinition + parameters: + - $ref: '#/components/parameters/ServiceName' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDefinitionGetResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get a single service definition + tags: + - Service Definition /api/v2/services/{service_id}: delete: description: Deletes an existing incident service. @@ -15258,6 +15821,10 @@ tags: name: Security Monitoring - description: Create, edit, and disable service accounts. name: Service Accounts +- description: API to create, update, retrieve and delete service definitions. + externalDocs: + url: https://docs.datadoghq.com/tracing/service_catalog/ + name: Service Definition - description: 'The usage metering API allows you to get hourly, daily, and monthly usage across multiple facets of Datadog. diff --git a/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.frozen b/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.frozen new file mode 100644 index 000000000000..d26456f4e0fc --- /dev/null +++ b/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.frozen @@ -0,0 +1 @@ +2022-10-10T10:16:22.954Z \ No newline at end of file diff --git a/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.yml b/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.yml new file mode 100644 index 000000000000..9ca4c6e470cb --- /dev/null +++ b/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.yml @@ -0,0 +1,49 @@ +http_interactions: +- recorded_at: Mon, 10 Oct 2022 10:16:22 GMT + request: + body: + encoding: UTF-8 + string: '{"contacts":[{"contact":"contact@datadoghq.com","name":"Team Email","type":"email"}],"dd-service":"service-Test-Create_or_update_service_definition_returns_CREATED_response-1665396982","dd-team":"my-team","docs":[{"name":"Architecture","provider":"google + drive","url":"https://gdrive/mydoc"}],"extensions":{"myorg/extension":"extensionValue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source + Code","provider":"GitHub","url":"https://github.com/DataDog/schema"}],"schema-version":"v2","tags":["my:tag","service:tag"],"team":"my-team"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/services/definitions + response: + body: + encoding: UTF-8 + string: '{"data":[{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T10:16:23.361540446Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[{"contact":"contact@datadoghq.com","type":"email","name":"Team + Email"}],"docs":[{"url":"https://gdrive/mydoc","name":"Architecture","provider":"google + drive"}],"repos":[{"url":"https://github.com/DataDog/schema","name":"Source + Code","provider":"GitHub"}],"tags":["my:tag","service:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"my-team","extensions":{},"dd-service":"service-test-create_or_update_service_definition_returns_created_response-1665396982"}},"type":"service-definition"}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Oct 2022 10:16:22 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/services/definitions/service-test-create_or_update_service_definition_returns_created_response-1665396982 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-Not-Found-response.frozen b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..ecf43ac54105 --- /dev/null +++ b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2022-10-10T10:17:50.609Z \ No newline at end of file diff --git a/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-Not-Found-response.yml b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-Not-Found-response.yml new file mode 100644 index 000000000000..7df43d17f7ab --- /dev/null +++ b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-Not-Found-response.yml @@ -0,0 +1,22 @@ +http_interactions: +- recorded_at: Mon, 10 Oct 2022 10:17:50 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/services/definitions/not-a-service + response: + body: + encoding: UTF-8 + string: '{"errors":["Not Found"],"error_details":[{}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.frozen b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.frozen new file mode 100644 index 000000000000..7c200fe88880 --- /dev/null +++ b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-10-10T12:48:37.381Z \ No newline at end of file diff --git a/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.yml b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.yml new file mode 100644 index 000000000000..34a5086bc196 --- /dev/null +++ b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Mon, 10 Oct 2022 12:48:37 GMT + request: + body: + encoding: UTF-8 + string: '{"dd-service":"service-Test-Delete_a_single_service_definition_returns_OK_response-1665406117","dd-team":"my-team","docs":[{"name":"Architecture","provider":"google + drive","url":"https://gdrive/mygivedoc"}],"extensions":{"frog/extension":"extensionFrogValue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source + Code","provider":"GitHub","url":"https://github.com/DataDog/given"}],"schema-version":"v2","tags":["this:tag","service:tag"],"team":"super-team"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/services/definitions + response: + body: + encoding: UTF-8 + string: '{"data":[{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T12:48:37.797458518Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[],"docs":[{"url":"https://gdrive/mygivedoc","name":"Architecture","provider":"google + drive"}],"repos":[{"url":"https://github.com/DataDog/given","name":"Source + Code","provider":"GitHub"}],"tags":["service:tag","this:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"super-team","extensions":{},"dd-service":"service-test-delete_a_single_service_definition_returns_ok_response-1665406117"}},"type":"service-definition"}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Oct 2022 12:48:37 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/services/definitions/service-Test-Delete_a_single_service_definition_returns_OK_response-1665406117 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Mon, 10 Oct 2022 12:48:37 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/services/definitions/service-test-delete_a_single_service_definition_returns_ok_response-1665406117 + response: + body: + encoding: UTF-8 + string: '{"errors":["Not Found"],"error_details":[{}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-Not-Found-response.frozen b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..8c5305630c84 --- /dev/null +++ b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2022-10-10T10:18:53.337Z \ No newline at end of file diff --git a/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-Not-Found-response.yml b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-Not-Found-response.yml new file mode 100644 index 000000000000..53645af98bb7 --- /dev/null +++ b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-Not-Found-response.yml @@ -0,0 +1,22 @@ +http_interactions: +- recorded_at: Mon, 10 Oct 2022 10:18:53 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/services/definitions/not-a-service + response: + body: + encoding: UTF-8 + string: '{"errors":["Not Found"],"error_details":[{}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.frozen b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.frozen new file mode 100644 index 000000000000..ebe71cdc8530 --- /dev/null +++ b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-10-10T12:33:59.012Z \ No newline at end of file diff --git a/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.yml b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.yml new file mode 100644 index 000000000000..1e176804d7a6 --- /dev/null +++ b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.yml @@ -0,0 +1,70 @@ +http_interactions: +- recorded_at: Mon, 10 Oct 2022 12:33:59 GMT + request: + body: + encoding: UTF-8 + string: '{"dd-service":"service-Test-Get_a_single_service_definition_returns_OK_response-1665405239","dd-team":"my-team","docs":[{"name":"Architecture","provider":"google + drive","url":"https://gdrive/mygivedoc"}],"extensions":{"frog/extension":"extensionFrogValue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source + Code","provider":"GitHub","url":"https://github.com/DataDog/given"}],"schema-version":"v2","tags":["this:tag","service:tag"],"team":"super-team"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/services/definitions + response: + body: + encoding: UTF-8 + string: '{"data":[{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T12:33:59.412229035Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[],"docs":[{"url":"https://gdrive/mygivedoc","name":"Architecture","provider":"google + drive"}],"repos":[{"url":"https://github.com/DataDog/given","name":"Source + Code","provider":"GitHub"}],"tags":["service:tag","this:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"super-team","extensions":{},"dd-service":"service-test-get_a_single_service_definition_returns_ok_response-1665405239"}},"type":"service-definition"}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Oct 2022 12:33:59 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/services/definitions/service-Test-Get_a_single_service_definition_returns_OK_response-1665405239 + response: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T12:24:16Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[],"docs":[{"url":"https://gdrive/mygivedoc","name":"Architecture","provider":"google + drive"}],"repos":[{"url":"https://github.com/DataDog/given","name":"Source + Code","provider":"GitHub"}],"tags":["service:tag","this:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"super-team","extensions":{},"dd-service":"service-test-get_a_single_service_definition_returns_ok_response-1665405239"}},"type":"service-definition","id":"d6822c235d26b96b47ded1a3eecba6c1"}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: Not Found +- recorded_at: Mon, 10 Oct 2022 12:33:59 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/services/definitions/service-test-get_a_single_service_definition_returns_ok_response-1665405239 + response: + body: + encoding: UTF-8 + string: '{"errors":["Not Found"],"error_details":[{}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/service_definition/Get-all-service-definitions-returns-OK-response.frozen b/cassettes/features/v2/service_definition/Get-all-service-definitions-returns-OK-response.frozen new file mode 100644 index 000000000000..5a0a49b3223d --- /dev/null +++ b/cassettes/features/v2/service_definition/Get-all-service-definitions-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-10-10T12:54:43.916Z \ No newline at end of file diff --git a/cassettes/features/v2/service_definition/Get-all-service-definitions-returns-OK-response.yml b/cassettes/features/v2/service_definition/Get-all-service-definitions-returns-OK-response.yml new file mode 100644 index 000000000000..794e1ae38beb --- /dev/null +++ b/cassettes/features/v2/service_definition/Get-all-service-definitions-returns-OK-response.yml @@ -0,0 +1,378 @@ +http_interactions: +- recorded_at: Mon, 10 Oct 2022 12:54:43 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/services/definitions + response: + body: + encoding: UTF-8 + string: '{"data":[{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-13T15:05:42Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"test-service"}},"type":"service-definition","id":"00c8f48f9bd65a7326d109c110903a48"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-24T12:26:31Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664022388"}},"type":"service-definition","id":"0b92287408533dc9010ece79b9b7f5da"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-23T12:27:52Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663936069"}},"type":"service-definition","id":"1121978c2d509695d6b308699ad4ff3c"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-08T00:35:29Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665189327"}},"type":"service-definition","id":"11c76361fe9a02282257f8281c3a7e84"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T12:48:37Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[],"docs":[{"url":"https://gdrive/mygivedoc","name":"Architecture","provider":"google + drive"}],"repos":[{"url":"https://github.com/DataDog/given","name":"Source + Code","provider":"GitHub"}],"tags":["this:tag","service:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"super-team","extensions":{},"dd-service":"service-test-delete_a_single_service_definition_returns_ok_response-1665406117"}},"type":"service-definition","id":"142c3ef445627d2db24dc2efe071feaf"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-17T00:37:54Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663375071"}},"type":"service-definition","id":"15dac466909d300907b2cb5c23d43034"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-19T20:35:44Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663619739-updated"}},"type":"service-definition","id":"193e0a13e3f5e898ce9a83bd06b390a5"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T00:34:27Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665362065"}},"type":"service-definition","id":"1eb456f17841bcead8624eb76c3dce31"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-26T00:35:13Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664152511"}},"type":"service-definition","id":"2cc3a1ebf7c90790ae7f58d4fe90152f"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-28T16:03:10Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664380988"}},"type":"service-definition","id":"2dc81e8abea92a4cd9a604ece099a953"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T12:14:45Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665404081"}},"type":"service-definition","id":"31f1337cc68728878aab22845fbc9e8b"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-20T12:19:04Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663676342"}},"type":"service-definition","id":"3227cd18de3a45aa88f01143cc20d58e"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-08-04T20:17:04Z","github-html-url":"","warnings":[]},"schema":{"links":[],"contacts":[],"docs":[],"repos":[],"tags":["host:isolated-diego-cell-0-270372e1-a8ae-4d3c-9678-41a072dd365c"],"dd-team":"intg-tools-libs","integrations":{},"schema-version":"v2","team":"intg-tools-libs","extensions":{},"dd-service":"python-sample-app-unbleachedsilk"}},"type":"service-definition","id":"3452c51e0db6322b8cd3290d06540978"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-18T12:17:13Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663503431"}},"type":"service-definition","id":"37636efa41bc8106beb35ccb2048e67d"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T12:33:59Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[],"docs":[{"url":"https://gdrive/mygivedoc","name":"Architecture","provider":"google + drive"}],"repos":[{"url":"https://github.com/DataDog/given","name":"Source + Code","provider":"GitHub"}],"tags":["service:tag","this:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"super-team","extensions":{},"dd-service":"service-test-get_a_single_service_definition_returns_ok_response-1665405239"}},"type":"service-definition","id":"3f712fd0846e734cf273d8bf10aba358"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-04T12:23:57Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664886235"}},"type":"service-definition","id":"44b348df99fb628eba7da07aa9c1f08a"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-15T00:32:57Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663201975"}},"type":"service-definition","id":"47c27bd6f1fc510941849e27cc87a50a"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-17T12:37:04Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663418218-updated"}},"type":"service-definition","id":"49485bc9760c67bd934a76b3769c6bf3"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-28T15:14:44Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664378080-updated"}},"type":"service-definition","id":"4983a2094fbed9a7426fa952b238e56a"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T00:24:50Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665361489"}},"type":"service-definition","id":"4c895f6110be70e6957f12e3f8e5a62d"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-17T00:29:11Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663374546-updated"}},"type":"service-definition","id":"4dc2beec923d8095338f6534979d652d"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-23T12:27:04Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663936022"}},"type":"service-definition","id":"5a1ce48c269f2c227f48ec0a5eeffae2"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-24T00:39:13Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663979951"}},"type":"service-definition","id":"5ddd66188cbbd5f857a86e3cd3c567d7"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-08T00:35:01Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665189299"}},"type":"service-definition","id":"5e90ebc923829a1f089305fa612dc842"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-29T00:31:52Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664411510"}},"type":"service-definition","id":"5e981473bd66799cdbfdab5667699d21"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-24T00:39:55Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663979992"}},"type":"service-definition","id":"6191014cb0d8f2a8a72a2f0acca8c35f"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-28T14:31:34Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664375492"}},"type":"service-definition","id":"654f80015adf24d97e59ffcb2a46e678"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-23T12:23:23Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663935801"}},"type":"service-definition","id":"690d77bf33bb43c1b40157eb1455fe97"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-15T00:32:32Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663201951"}},"type":"service-definition","id":"6a7a9a2a95b392e21466173f83868da1"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-17T12:36:53Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663418211"}},"type":"service-definition","id":"6ae98d51f75fab86e96d6cc9efd02123"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-09T12:13:57Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665317635"}},"type":"service-definition","id":"78031c2a631318e7f2cb7bfbf68a18be"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-25T00:36:39Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664066196"}},"type":"service-definition","id":"82da2d6ea18971b06c81c55b36edd03d"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-16T00:34:30Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663288468"}},"type":"service-definition","id":"85b18f281ff2c3d794195d4e5e3703de"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-17T12:21:03Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663417258"}},"type":"service-definition","id":"866a88946ed335a8f3de72a9617fa39d"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T10:29:06Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[],"docs":[{"url":"https://gdrive/mygivedoc","name":"Architecture","provider":"google + drive"}],"repos":[{"url":"https://github.com/DataDog/given","name":"Source + Code","provider":"GitHub"}],"tags":["this:tag","service:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"super-team","extensions":{},"dd-service":"service-test-get_a_single_service_definition_returns_ok_response-1665397746"}},"type":"service-definition","id":"8b2110b5ac6ad3b8ced03af62700f96a"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-20T12:31:41Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663677098"}},"type":"service-definition","id":"8ba17884f966f9cc42355051bc45fe15"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-18T00:36:38Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663461397"}},"type":"service-definition","id":"96399afc130bc415a0f555d5a81c7591"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-22T12:27:47Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663849665"}},"type":"service-definition","id":"9b02212ffcf45156efa8254441343b65"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-08T00:25:24Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665188722"}},"type":"service-definition","id":"9cd2939b2ccad303a5faf906329bdddd"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-24T12:26:46Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664022404"}},"type":"service-definition","id":"a2af7651d982e91ab5305665b967e7ff"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-05T12:15:01Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664972099"}},"type":"service-definition","id":"a91a2011287371e9bc78e8440dfd6d30"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-24T00:40:33Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663980031"}},"type":"service-definition","id":"b283555a3adcbc6e7ee662fca6c9c815"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-18T00:25:46Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663460745"}},"type":"service-definition","id":"b7c93e14a001dec8f48c54ac46ee52ff"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-19T12:18:01Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663589879"}},"type":"service-definition","id":"bb70888ec662b81ec18623b586b34c72"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-24T12:23:19Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664022198"}},"type":"service-definition","id":"bea5986b81a67b3a06f74db75753cbf6"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-20T12:31:30Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663677087"}},"type":"service-definition","id":"c5187921f635b5679171150e3c497518"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-22T12:27:21Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663849639"}},"type":"service-definition","id":"c5a73fff1eeb3082dedf1015bf5eb8c7"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-01T12:15:40Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664626538"}},"type":"service-definition","id":"c887ca10d1ffc5d9a939c68f38d84e25"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-07T12:15:14Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665144911"}},"type":"service-definition","id":"cc016d2b21fad7b7af073a6fcf8f70b6"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-15T00:33:02Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663201980"}},"type":"service-definition","id":"cc2af89492dc572929a72b2705142aa2"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-09T12:24:43Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665318281"}},"type":"service-definition","id":"d4d04320f1daf9db2e3ff75de377edaa"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T12:24:16Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[],"docs":[{"url":"https://gdrive/mygivedoc","name":"Architecture","provider":"google + drive"}],"repos":[{"url":"https://github.com/DataDog/given","name":"Source + Code","provider":"GitHub"}],"tags":["this:tag","service:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"super-team","extensions":{},"dd-service":"service-test-get_a_single_service_definition_returns_ok_response-1665404656"}},"type":"service-definition","id":"d6822c235d26b96b47ded1a3eecba6c1"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-06T12:23:44Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665059022"}},"type":"service-definition","id":"dbe6ec9de10888c6d333539aecdf962a"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-08T12:15:17Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665231315"}},"type":"service-definition","id":"e148aa733e21ac31994b1e26a789c418"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-25T00:41:11Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664066464-updated"}},"type":"service-definition","id":"e20df46b4b1b3c34eee0db47f7cdaa1f"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-09T12:25:03Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665318301"}},"type":"service-definition","id":"e49200dcf5868c0e0f06249986f37446"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-18T00:36:33Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663461391"}},"type":"service-definition","id":"e5745cc928c0887bdb6b63d9649636c9"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-26T00:38:33Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664152711"}},"type":"service-definition","id":"ea7e4590c85ff751a03d3e957396c3ba"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-08-04T20:37:09Z","github-html-url":"","warnings":[]},"schema":{"links":[],"contacts":[{"contact":"noueman.khalikine@datadoghq.com","type":"email"}],"docs":[],"repos":[],"tags":[],"dd-team":"intg-tools-libs","integrations":{},"schema-version":"v2","team":"intg-tools-libs","extensions":{},"dd-service":"python-app-checks-enabled"}},"type":"service-definition","id":"edbfdd906e141e7512918fa561c7e90d"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-05T12:25:35Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664972730-updated"}},"type":"service-definition","id":"f031b34f679003f9eaff0cd02324a42e"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-28T16:02:54Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664380972"}},"type":"service-definition","id":"f4a723cbeccb6827f12849a358fbfc3a"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-22T12:23:52Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1663849431"}},"type":"service-definition","id":"f5d046880a32d46aa4f0a05e8a6dd5f8"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-09-26T00:38:27Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["business-unit:retail","cost-center:engineering"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1664152705"}},"type":"service-definition","id":"fa1f962ad5fbc7655d080ac2a7010065"},{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T00:34:05Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://runbook/shopping-cart","type":"runbook","name":"shopping-cart + runbook"}],"contacts":[{"contact":"https://www.slack.com/archives/shopping-cart","type":"slack","name":"Support + Slack"},{"contact":"team@shopping.com","type":"email","name":"Support Email"}],"docs":[{"url":"https://google.drive/shopping-cart-architecture","name":"shopping-cart + architecture","provider":"gdoc"},{"url":"https://wiki/shopping-cart","name":"shopping-cart + service Wiki","provider":"wiki"}],"repos":[{"url":"http://github/shopping-cart","name":"shopping-cart + source code","provider":"github"}],"tags":["cost-center:engineering","business-unit:retail"],"dd-team":"e-commerce","integrations":{"pagerduty":"https://www.pagerduty.com/service-directory/Pshopping-cart"},"schema-version":"v2","team":"E + Commerce","extensions":{"datadoghq.com/shopping-cart":{"customField":"customValue"}},"dd-service":"tf-testaccdatadogservicedefinition_basic-local-1665362043"}},"type":"service-definition","id":"fd7673ad83bc150e2d690fc8c9196f41"}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb new file mode 100644 index 000000000000..ca1474032f2d --- /dev/null +++ b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb @@ -0,0 +1,52 @@ +# Create or update service definition returns "CREATED" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ServiceDefinitionAPI.new + +body = DatadogAPIClient::V2::ServiceDefinitionV2.new({ + contacts: [ + DatadogAPIClient::V2::ServiceDefinitionV2Email.new({ + contact: "contact@datadoghq.com", + name: "Team Email", + type: DatadogAPIClient::V2::ServiceDefinitionV2EmailType::EMAIL, + }), + ], + dd_service: "service-Example-Create_or_update_service_definition_returns_CREATED_response", + dd_team: "my-team", + docs: [ + DatadogAPIClient::V2::ServiceDefinitionV2Doc.new({ + name: "Architecture", + provider: "google drive", + url: "https://gdrive/mydoc", + }), + ], + extensions: {}, + integrations: DatadogAPIClient::V2::ServiceDefinitionV2Integrations.new({ + opsgenie: DatadogAPIClient::V2::ServiceDefinitionV2Opsgenie.new({ + region: DatadogAPIClient::V2::ServiceDefinitionV2OpsgenieRegion::US, + service_id: "123e4567-e89b-12d3-a456-426614174000", + }), + pagerduty: "https://my-org.pagerduty.com/service-directory/PMyService", + }), + links: [ + DatadogAPIClient::V2::ServiceDefinitionV2Link.new({ + name: "Runbook", + type: DatadogAPIClient::V2::ServiceDefinitionV2LinkType::RUNBOOK, + url: "https://my-runbook", + }), + ], + repos: [ + DatadogAPIClient::V2::ServiceDefinitionV2Repo.new({ + name: "Source Code", + provider: "GitHub", + url: "https://github.com/DataDog/schema", + }), + ], + schema_version: DatadogAPIClient::V2::ServiceDefinitionV2Version::V2, + tags: [ + "my:tag", + "service:tag", + ], + team: "my-team", +}) +p api_instance.create_or_update_service_definitions(body) diff --git a/examples/v2/service-definition/DeleteServiceDefinition.rb b/examples/v2/service-definition/DeleteServiceDefinition.rb new file mode 100644 index 000000000000..e0666c4b1863 --- /dev/null +++ b/examples/v2/service-definition/DeleteServiceDefinition.rb @@ -0,0 +1,5 @@ +# Delete a single service definition returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ServiceDefinitionAPI.new +api_instance.delete_service_definition("service-Example-Delete_a_single_service_definition_returns_OK_response") diff --git a/examples/v2/service-definition/GetServiceDefinition.rb b/examples/v2/service-definition/GetServiceDefinition.rb new file mode 100644 index 000000000000..f3dfadd4ed3f --- /dev/null +++ b/examples/v2/service-definition/GetServiceDefinition.rb @@ -0,0 +1,5 @@ +# Get a single service definition returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ServiceDefinitionAPI.new +p api_instance.get_service_definition("service-Example-Get_a_single_service_definition_returns_OK_response") diff --git a/examples/v2/service-definition/ListServiceDefinitions.rb b/examples/v2/service-definition/ListServiceDefinitions.rb new file mode 100644 index 000000000000..99cb05c4aea8 --- /dev/null +++ b/examples/v2/service-definition/ListServiceDefinitions.rb @@ -0,0 +1,5 @@ +# Get all service definitions returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ServiceDefinitionAPI.new +p api_instance.list_service_definitions() diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d65513e12588..fb9e56c1a277 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1287,6 +1287,15 @@ "service_id" => "String", "body" => "IncidentServiceUpdateRequest", }, + "v2.CreateOrUpdateServiceDefinitions" => { + "body" => "ServiceDefinitionsCreateRequest", + }, + "v2.DeleteServiceDefinition" => { + "service_name" => "String", + }, + "v2.GetServiceDefinition" => { + "service_name" => "String", + }, "v2.ListIncidentTeams" => { "include" => "IncidentRelatedObject", "page_size" => "Integer", diff --git a/features/v2/given.json b/features/v2/given.json index ae5daeae6999..b5e5b0b893d8 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -286,6 +286,18 @@ "tag": "Incident Services", "operationId": "CreateIncidentService" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"dd-service\": \"service-{{ unique}}\",\n \"dd-team\": \"my-team\",\n \"docs\": [{\"name\": \"Architecture\",\n \"provider\": \"google drive\",\n \"url\": \"https://gdrive/mygivedoc\"}],\n \"extensions\": {\"frog/extension\": \"extensionFrogValue\"},\n \"integrations\": {\"opsgenie\": {\"region\": \"US\",\n \"service-id\": \"123e4567-e89b-12d3-a456-426614174000\"},\n \"pagerduty\": \"https://my-org.pagerduty.com/service-directory/PMyService\"},\n \"links\": [{\"name\": \"Runbook\", \"type\": \"runbook\", \"url\": \"https://my-runbook\"}],\n \"repos\": [{\"name\": \"Source Code\",\n \"provider\": \"GitHub\",\n \"url\": \"https://github.com/DataDog/given\"}],\n \"schema-version\": \"v2\",\n \"tags\": [\"this:tag\", \"service:tag\"],\n \"team\": \"super-team\"\n}" + } + ], + "step": "there is a valid \"service_definition\" in the system", + "key": "service_definition", + "tag": "Service Definition", + "operationId": "CreateOrUpdateServiceDefinitions" + }, { "parameters": [ { diff --git a/features/v2/service_definition.feature b/features/v2/service_definition.feature new file mode 100644 index 000000000000..8b1e5dd6e0a9 --- /dev/null +++ b/features/v2/service_definition.feature @@ -0,0 +1,91 @@ +@endpoint(service-definition) @endpoint(service-definition-v2) +Feature: Service Definition + API to create, update, retrieve and delete service definitions. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ServiceDefinition" API + + @generated @skip @team:DataDog/apm-insights + Scenario: Create or update service definition returns "Bad Request" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"contacts": [{"contact": "contact@datadoghq.com", "name": "Team Email", "type": "email"}], "dd-service": "my-service", "dd-team": "my-team", "docs": [{"name": "Architecture", "provider": "google drive", "url": "https://gdrive/mydoc"}], "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-id": "123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": "https://my-org.pagerduty.com/service-directory/PMyService"}, "links": [{"name": "Runbook", "type": "runbook", "url": "https://my-runbook"}], "repos": [{"name": "Source Code", "provider": "GitHub", "url": "https://github.com/DataDog/schema"}], "schema-version": "v2", "tags": ["my:tag", "service:tag"], "team": "my-team"} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/apm-insights + Scenario: Create or update service definition returns "CREATED" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"contacts": [{"contact": "contact@datadoghq.com", "name": "Team Email", "type": "email"}], "dd-service": "service-{{ unique }}", "dd-team": "my-team", "docs": [{"name": "Architecture", "provider": "google drive", "url": "https://gdrive/mydoc"}], "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-id": "123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": "https://my-org.pagerduty.com/service-directory/PMyService"}, "links": [{"name": "Runbook", "type": "runbook", "url": "https://my-runbook"}], "repos": [{"name": "Source Code", "provider": "GitHub", "url": "https://github.com/DataDog/schema"}], "schema-version": "v2", "tags": ["my:tag", "service:tag"], "team": "my-team"} + When the request is sent + Then the response status is 200 CREATED + And the response "data[0].attributes.meta.ingested-schema-version" is equal to "v2" + + @generated @skip @team:DataDog/apm-insights + Scenario: Create or update service definition returns "Conflict" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"contacts": [{"contact": "contact@datadoghq.com", "name": "Team Email", "type": "email"}], "dd-service": "my-service", "dd-team": "my-team", "docs": [{"name": "Architecture", "provider": "google drive", "url": "https://gdrive/mydoc"}], "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-id": "123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": "https://my-org.pagerduty.com/service-directory/PMyService"}, "links": [{"name": "Runbook", "type": "runbook", "url": "https://my-runbook"}], "repos": [{"name": "Source Code", "provider": "GitHub", "url": "https://github.com/DataDog/schema"}], "schema-version": "v2", "tags": ["my:tag", "service:tag"], "team": "my-team"} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/apm-insights + Scenario: Delete a single service definition returns "Bad Request" response + Given new "DeleteServiceDefinition" request + And request contains "service_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/apm-insights + Scenario: Delete a single service definition returns "Not Found" response + Given new "DeleteServiceDefinition" request + And request contains "service_name" parameter with value "not-a-service" + When the request is sent + Then the response status is 404 Not Found + And the response "errors[0]" is equal to "Not Found" + + @replay-only @team:DataDog/apm-insights + Scenario: Delete a single service definition returns "OK" response + Given there is a valid "service_definition" in the system + And new "DeleteServiceDefinition" request + And request contains "service_name" parameter with value "service-{{ unique }}" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/apm-insights + Scenario: Get a single service definition returns "Bad Request" response + Given new "GetServiceDefinition" request + And request contains "service_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/apm-insights + Scenario: Get a single service definition returns "Conflict" response + Given new "GetServiceDefinition" request + And request contains "service_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/apm-insights + Scenario: Get a single service definition returns "Not Found" response + Given new "GetServiceDefinition" request + And request contains "service_name" parameter with value "not-a-service" + When the request is sent + Then the response status is 404 Not Found + And the response "errors[0]" is equal to "Not Found" + + @replay-only @team:DataDog/apm-insights + Scenario: Get a single service definition returns "OK" response + Given there is a valid "service_definition" in the system + And new "GetServiceDefinition" request + And request contains "service_name" parameter with value "service-{{ unique }}" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.meta.ingested-schema-version" is equal to "v2" + + @team:DataDog/apm-insights + Scenario: Get all service definitions returns "OK" response + Given new "ListServiceDefinitions" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.meta.ingested-schema-version" is equal to "v2" diff --git a/features/v2/undo.json b/features/v2/undo.json index 80a6729cdffb..fef02ce33c9f 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -867,6 +867,37 @@ "type": "unsafe" } }, + "ListServiceDefinitions": { + "tag": "Service Definition", + "undo": { + "type": "safe" + } + }, + "CreateOrUpdateServiceDefinitions": { + "tag": "Service Definition", + "undo": { + "operationId": "DeleteServiceDefinition", + "parameters": [ + { + "name": "service_name", + "source": "data[0].attributes.schema.dd-service" + } + ], + "type": "unsafe" + } + }, + "DeleteServiceDefinition": { + "tag": "Service Definition", + "undo": { + "type": "idempotent" + } + }, + "GetServiceDefinition": { + "tag": "Service Definition", + "undo": { + "type": "safe" + } + }, "DeleteIncidentService": { "tag": "Incident Services", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4298760bcb15..32be68d36844 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1271,6 +1271,36 @@ def overrides "v2.service_account_create_attributes" => "ServiceAccountCreateAttributes", "v2.service_account_create_data" => "ServiceAccountCreateData", "v2.service_account_create_request" => "ServiceAccountCreateRequest", + "v2.service_definition_data" => "ServiceDefinitionData", + "v2.service_definition_data_attributes" => "ServiceDefinitionDataAttributes", + "v2.service_definition_get_response" => "ServiceDefinitionGetResponse", + "v2.service_definition_list_response" => "ServiceDefinitionListResponse", + "v2.service_definition_meta" => "ServiceDefinitionMeta", + "v2.service_definition_schema" => "ServiceDefinitionSchema", + "v2.service_definitions_create_request" => "ServiceDefinitionsCreateRequest", + "v2.service_definitions_create_response" => "ServiceDefinitionsCreateResponse", + "v2.service_definition_v1" => "ServiceDefinitionV1", + "v2.service_definition_v1_contact" => "ServiceDefinitionV1Contact", + "v2.service_definition_v1_info" => "ServiceDefinitionV1Info", + "v2.service_definition_v1_integrations" => "ServiceDefinitionV1Integrations", + "v2.service_definition_v1_org" => "ServiceDefinitionV1Org", + "v2.service_definition_v1_resource" => "ServiceDefinitionV1Resource", + "v2.service_definition_v1_resource_type" => "ServiceDefinitionV1ResourceType", + "v2.service_definition_v1_version" => "ServiceDefinitionV1Version", + "v2.service_definition_v2" => "ServiceDefinitionV2", + "v2.service_definition_v2_contact" => "ServiceDefinitionV2Contact", + "v2.service_definition_v2_doc" => "ServiceDefinitionV2Doc", + "v2.service_definition_v2_email" => "ServiceDefinitionV2Email", + "v2.service_definition_v2_email_type" => "ServiceDefinitionV2EmailType", + "v2.service_definition_v2_integrations" => "ServiceDefinitionV2Integrations", + "v2.service_definition_v2_link" => "ServiceDefinitionV2Link", + "v2.service_definition_v2_link_type" => "ServiceDefinitionV2LinkType", + "v2.service_definition_v2_opsgenie" => "ServiceDefinitionV2Opsgenie", + "v2.service_definition_v2_opsgenie_region" => "ServiceDefinitionV2OpsgenieRegion", + "v2.service_definition_v2_repo" => "ServiceDefinitionV2Repo", + "v2.service_definition_v2_slack" => "ServiceDefinitionV2Slack", + "v2.service_definition_v2_slack_type" => "ServiceDefinitionV2SlackType", + "v2.service_definition_v2_version" => "ServiceDefinitionV2Version", "v2.usage_application_security_monitoring_response" => "UsageApplicationSecurityMonitoringResponse", "v2.usage_attributes_object" => "UsageAttributesObject", "v2.usage_data_object" => "UsageDataObject", @@ -1352,6 +1382,7 @@ def overrides "v2.rum_api" => "RUMAPI", "v2.security_monitoring_api" => "SecurityMonitoringAPI", "v2.service_accounts_api" => "ServiceAccountsAPI", + "v2.service_definition_api" => "ServiceDefinitionAPI", "v2.usage_metering_api" => "UsageMeteringAPI", "v2.users_api" => "UsersAPI" } diff --git a/lib/datadog_api_client/v2/api/service_definition_api.rb b/lib/datadog_api_client/v2/api/service_definition_api.rb new file mode 100644 index 000000000000..13cbf0ead709 --- /dev/null +++ b/lib/datadog_api_client/v2/api/service_definition_api.rb @@ -0,0 +1,283 @@ +=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 ServiceDefinitionAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create or update service definition. + # + # @see #create_or_update_service_definitions_with_http_info + def create_or_update_service_definitions(body, opts = {}) + data, _status_code, _headers = create_or_update_service_definitions_with_http_info(body, opts) + data + end + + # Create or update service definition. + # + # Create or update service definition in the Datadog Service Catalog. + # + # @param body [ServiceDefinitionsCreateRequest] Service Definition YAML/JSON. + # @param opts [Hash] the optional parameters + # @return [Array<(ServiceDefinitionListResponse, Integer, Hash)>] ServiceDefinitionListResponse data, response status code and response headers + def create_or_update_service_definitions_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ServiceDefinitionAPI.create_or_update_service_definitions ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ServiceDefinitionAPI.create_or_update_service_definitions" + end + # resource path + local_var_path = '/api/v2/services/definitions' + + # 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(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ServiceDefinitionListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_or_update_service_definitions, + :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: ServiceDefinitionAPI#create_or_update_service_definitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a single service definition. + # + # @see #delete_service_definition_with_http_info + def delete_service_definition(service_name, opts = {}) + delete_service_definition_with_http_info(service_name, opts) + nil + end + + # Delete a single service definition. + # + # Delete a single service definition in the Datadog Service Catalog. + # + # @param service_name [String] The name of the service. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_service_definition_with_http_info(service_name, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ServiceDefinitionAPI.delete_service_definition ...' + end + # verify the required parameter 'service_name' is set + if @api_client.config.client_side_validation && service_name.nil? + fail ArgumentError, "Missing the required parameter 'service_name' when calling ServiceDefinitionAPI.delete_service_definition" + end + # resource path + local_var_path = '/api/v2/services/definitions/{service_name}'.sub('{service_name}', CGI.escape(service_name.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] + + new_options = opts.merge( + :operation => :delete_service_definition, + :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: ServiceDefinitionAPI#delete_service_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a single service definition. + # + # @see #get_service_definition_with_http_info + def get_service_definition(service_name, opts = {}) + data, _status_code, _headers = get_service_definition_with_http_info(service_name, opts) + data + end + + # Get a single service definition. + # + # Get a single service definition from the Datadog Service Catalog. + # + # @param service_name [String] The name of the service. + # @param opts [Hash] the optional parameters + # @return [Array<(ServiceDefinitionGetResponse, Integer, Hash)>] ServiceDefinitionGetResponse data, response status code and response headers + def get_service_definition_with_http_info(service_name, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ServiceDefinitionAPI.get_service_definition ...' + end + # verify the required parameter 'service_name' is set + if @api_client.config.client_side_validation && service_name.nil? + fail ArgumentError, "Missing the required parameter 'service_name' when calling ServiceDefinitionAPI.get_service_definition" + end + # resource path + local_var_path = '/api/v2/services/definitions/{service_name}'.sub('{service_name}', CGI.escape(service_name.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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ServiceDefinitionGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_service_definition, + :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: ServiceDefinitionAPI#get_service_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get all service definitions. + # + # @see #list_service_definitions_with_http_info + def list_service_definitions(opts = {}) + data, _status_code, _headers = list_service_definitions_with_http_info(opts) + data + end + + # Get all service definitions. + # + # Get a list of all service definitions from the Datadog Service Catalog. + # + # @param opts [Hash] the optional parameters + # @return [Array<(ServiceDefinitionsCreateResponse, Integer, Hash)>] ServiceDefinitionsCreateResponse data, response status code and response headers + def list_service_definitions_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ServiceDefinitionAPI.list_service_definitions ...' + end + # resource path + local_var_path = '/api/v2/services/definitions' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ServiceDefinitionsCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_service_definitions, + :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: ServiceDefinitionAPI#list_service_definitions\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/service_definition_data.rb b/lib/datadog_api_client/v2/models/service_definition_data.rb new file mode 100644 index 000000000000..c5b85f9d3dd9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_data.rb @@ -0,0 +1,121 @@ +=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 + # Service definition data. + class ServiceDefinitionData + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Service definition attributes. + attr_accessor :attributes + + # Service definition type. + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ServiceDefinitionDataAttributes', + :'type' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionData` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + 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? + true + 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 && + type == o.type + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb b/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb new file mode 100644 index 000000000000..a7051f0ce973 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb @@ -0,0 +1,121 @@ +=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 + # Service definition attributes. + class ServiceDefinitionDataAttributes + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Metadata about a service definition. + attr_accessor :meta + + # Service definition schema. + attr_accessor :schema + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'meta' => :'meta', + :'schema' => :'schema' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'meta' => :'ServiceDefinitionMeta', + :'schema' => :'ServiceDefinitionSchema' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionDataAttributes` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'schema') + self.schema = attributes[:'schema'] + 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? + true + 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 && + meta == o.meta && + schema == o.schema + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [meta, schema].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_get_response.rb b/lib/datadog_api_client/v2/models/service_definition_get_response.rb new file mode 100644 index 000000000000..8622a2439f13 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_get_response.rb @@ -0,0 +1,111 @@ +=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 + # Get service definition response. + class ServiceDefinitionGetResponse + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Service definition data. + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ServiceDefinitionData' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionGetResponse` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + true + 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 + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_list_response.rb b/lib/datadog_api_client/v2/models/service_definition_list_response.rb new file mode 100644 index 000000000000..62808c7f37fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_list_response.rb @@ -0,0 +1,113 @@ +=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 + # Get service definitions response. + class ServiceDefinitionListResponse + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Get service definitions response payload. + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionListResponse` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + true + 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 + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_meta.rb b/lib/datadog_api_client/v2/models/service_definition_meta.rb new file mode 100644 index 000000000000..53b978e42f8a --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_meta.rb @@ -0,0 +1,141 @@ +=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 about a service definition. + class ServiceDefinitionMeta + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # GitHub HTML URL. + attr_accessor :github_html_url + + # Ingestion schema version. + attr_accessor :ingested_schema_version + + # Ingestion source of the service definition. + attr_accessor :ingestion_source + + # Last modified time of the service definition. + attr_accessor :last_modified_time + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'github_html_url' => :'github-html-url', + :'ingested_schema_version' => :'ingested-schema-version', + :'ingestion_source' => :'ingestion-source', + :'last_modified_time' => :'last-modified-time' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'github_html_url' => :'String', + :'ingested_schema_version' => :'String', + :'ingestion_source' => :'String', + :'last_modified_time' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionMeta` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'github_html_url') + self.github_html_url = attributes[:'github_html_url'] + end + + if attributes.key?(:'ingested_schema_version') + self.ingested_schema_version = attributes[:'ingested_schema_version'] + end + + if attributes.key?(:'ingestion_source') + self.ingestion_source = attributes[:'ingestion_source'] + end + + if attributes.key?(:'last_modified_time') + self.last_modified_time = attributes[:'last_modified_time'] + 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? + true + 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 && + github_html_url == o.github_html_url && + ingested_schema_version == o.ingested_schema_version && + ingestion_source == o.ingestion_source && + last_modified_time == o.last_modified_time + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [github_html_url, ingested_schema_version, ingestion_source, last_modified_time].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_schema.rb b/lib/datadog_api_client/v2/models/service_definition_schema.rb new file mode 100644 index 000000000000..f10741030fe7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_schema.rb @@ -0,0 +1,63 @@ +=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 + # Service definition schema. + module ServiceDefinitionSchema + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ServiceDefinitionV1', + :'ServiceDefinitionV2' + ] + end + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v1.rb b/lib/datadog_api_client/v2/models/service_definition_v1.rb new file mode 100644 index 000000000000..9761f15babfa --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v1.rb @@ -0,0 +1,207 @@ +=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 + # Deprecated - Service definition V1 for providing additional service metadata and integrations. + class ServiceDefinitionV1 + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Contact information about the service. + attr_accessor :contact + + # Extensions to V1 schema. + attr_accessor :extensions + + # A list of external links related to the services. + attr_accessor :external_resources + + # Basic information about a service. + attr_accessor :info + + # Third party integrations that Datadog supports. + attr_accessor :integrations + + # Org related information about the service. + attr_accessor :org + + # Schema version being used. + attr_accessor :schema_version + + # A set of custom tags. + attr_accessor :tags + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'contact' => :'contact', + :'extensions' => :'extensions', + :'external_resources' => :'external-resources', + :'info' => :'info', + :'integrations' => :'integrations', + :'org' => :'org', + :'schema_version' => :'schema-version', + :'tags' => :'tags' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'contact' => :'ServiceDefinitionV1Contact', + :'extensions' => :'Hash', + :'external_resources' => :'Array', + :'info' => :'ServiceDefinitionV1Info', + :'integrations' => :'ServiceDefinitionV1Integrations', + :'org' => :'ServiceDefinitionV1Org', + :'schema_version' => :'ServiceDefinitionV1Version', + :'tags' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV1` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'contact') + self.contact = attributes[:'contact'] + end + + if attributes.key?(:'extensions') + self.extensions = attributes[:'extensions'] + end + + if attributes.key?(:'external_resources') + if (value = attributes[:'external_resources']).is_a?(Array) + self.external_resources = value + end + end + + if attributes.key?(:'info') + self.info = attributes[:'info'] + end + + if attributes.key?(:'integrations') + self.integrations = attributes[:'integrations'] + end + + if attributes.key?(:'org') + self.org = attributes[:'org'] + end + + if attributes.key?(:'schema_version') + self.schema_version = attributes[:'schema_version'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @info.nil? + return false if @schema_version.nil? + true + end + + # Custom attribute writer method with validation + # @param info [Object] Object to be assigned + # @!visibility private + def info=(info) + if info.nil? + fail ArgumentError, 'invalid value for "info", info cannot be nil.' + end + @info = info + end + + # Custom attribute writer method with validation + # @param schema_version [Object] Object to be assigned + # @!visibility private + def schema_version=(schema_version) + if schema_version.nil? + fail ArgumentError, 'invalid value for "schema_version", schema_version cannot be nil.' + end + @schema_version = schema_version + 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 && + contact == o.contact && + extensions == o.extensions && + external_resources == o.external_resources && + info == o.info && + integrations == o.integrations && + org == o.org && + schema_version == o.schema_version && + tags == o.tags + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [contact, extensions, external_resources, info, integrations, org, schema_version, tags].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb b/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb new file mode 100644 index 000000000000..c78c7e801d84 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb @@ -0,0 +1,121 @@ +=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 + # Contact information about the service. + class ServiceDefinitionV1Contact + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Service owner’s email. + attr_accessor :email + + # Service owner’s slack channel. + attr_accessor :slack + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'email' => :'email', + :'slack' => :'slack' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'email' => :'String', + :'slack' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV1Contact` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Contact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'slack') + self.slack = attributes[:'slack'] + 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? + true + 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 && + email == o.email && + slack == o.slack + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [email, slack].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_info.rb b/lib/datadog_api_client/v2/models/service_definition_v1_info.rb new file mode 100644 index 000000000000..958d3114b90f --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v1_info.rb @@ -0,0 +1,152 @@ +=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 + # Basic information about a service. + class ServiceDefinitionV1Info + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Unique identifier of the service. Must be unique across all services and is used to match with a service in Datadog. + attr_accessor :dd_service + + # A short description of the service. + attr_accessor :description + + # A friendly name of the service. + attr_accessor :display_name + + # Service tier. + attr_accessor :service_tier + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dd_service' => :'dd-service', + :'description' => :'description', + :'display_name' => :'display-name', + :'service_tier' => :'service-tier' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dd_service' => :'String', + :'description' => :'String', + :'display_name' => :'String', + :'service_tier' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV1Info` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Info`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'dd_service') + self.dd_service = attributes[:'dd_service'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'service_tier') + self.service_tier = attributes[:'service_tier'] + 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 @dd_service.nil? + true + end + + # Custom attribute writer method with validation + # @param dd_service [Object] Object to be assigned + # @!visibility private + def dd_service=(dd_service) + if dd_service.nil? + fail ArgumentError, 'invalid value for "dd_service", dd_service cannot be nil.' + end + @dd_service = dd_service + 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 && + dd_service == o.dd_service && + description == o.description && + display_name == o.display_name && + service_tier == o.service_tier + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dd_service, description, display_name, service_tier].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb b/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb new file mode 100644 index 000000000000..e10b41d68b91 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb @@ -0,0 +1,111 @@ +=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 + # Third party integrations that Datadog supports. + class ServiceDefinitionV1Integrations + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # PagerDuty service url for the service. + attr_accessor :pagerduty + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'pagerduty' => :'pagerduty' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'pagerduty' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV1Integrations` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Integrations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pagerduty') + self.pagerduty = attributes[:'pagerduty'] + 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? + true + 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 && + pagerduty == o.pagerduty + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [pagerduty].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_org.rb b/lib/datadog_api_client/v2/models/service_definition_v1_org.rb new file mode 100644 index 000000000000..01d0d7a02ef3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v1_org.rb @@ -0,0 +1,121 @@ +=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 + # Org related information about the service. + class ServiceDefinitionV1Org + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # App feature for which this service supports. + attr_accessor :application + + # Team that owns the service. + attr_accessor :team + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application' => :'application', + :'team' => :'team' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application' => :'String', + :'team' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV1Org` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Org`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'application') + self.application = attributes[:'application'] + end + + if attributes.key?(:'team') + self.team = attributes[:'team'] + 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? + true + 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 && + application == o.application && + team == o.team + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application, team].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb b/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb new file mode 100644 index 000000000000..b310e5fa2176 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb @@ -0,0 +1,164 @@ +=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 + # Service's external links. + class ServiceDefinitionV1Resource + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Link name. + attr_accessor :name + + # Link type. + attr_accessor :type + + # Link URL. + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'type' => :'type', + :'url' => :'url' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'type' => :'ServiceDefinitionV1ResourceType', + :'url' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV1Resource` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV1Resource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + 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 @name.nil? + return false if @type.nil? + return false if @url.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + 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 url [Object] Object to be assigned + # @!visibility private + def url=(url) + if url.nil? + fail ArgumentError, 'invalid value for "url", url cannot be nil.' + end + @url = url + 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 && + type == o.type && + url == o.url + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, type, url].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_resource_type.rb b/lib/datadog_api_client/v2/models/service_definition_v1_resource_type.rb new file mode 100644 index 000000000000..f45a7558fc8d --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v1_resource_type.rb @@ -0,0 +1,34 @@ +=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 + # Link type. + class ServiceDefinitionV1ResourceType + include BaseEnumModel + + DOC = "doc".freeze + WIKI = "wiki".freeze + RUNBOOK = "runbook".freeze + URL = "url".freeze + REPO = "repo".freeze + DASHBOARD = "dashboard".freeze + ONCALL = "oncall".freeze + CODE = "code".freeze + LINK = "link".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_version.rb b/lib/datadog_api_client/v2/models/service_definition_v1_version.rb new file mode 100644 index 000000000000..2f99fce4b7f8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v1_version.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 + # Schema version being used. + class ServiceDefinitionV1Version + include BaseEnumModel + + v1 = "v1".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2.rb b/lib/datadog_api_client/v2/models/service_definition_v2.rb new file mode 100644 index 000000000000..b421707cbbc3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2.rb @@ -0,0 +1,243 @@ +=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 + # Service definition V2 for providing service metadata and integrations. + class ServiceDefinitionV2 + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # A list of contacts related to the services. + attr_accessor :contacts + + # Unique identifier of the service. Must be unique across all services and is used to match with a service in Datadog. + attr_accessor :dd_service + + # Experimental feature. A Team handle that matches a Team in the Datadog Teams product. + attr_accessor :dd_team + + # A list of documentation related to the services. + attr_accessor :docs + + # Extensions to V2 schema. + attr_accessor :extensions + + # Third party integrations that Datadog supports. + attr_accessor :integrations + + # A list of links related to the services. + attr_accessor :links + + # A list of code repositories related to the services. + attr_accessor :repos + + # Schema version being used. + attr_accessor :schema_version + + # A set of custom tags. + attr_accessor :tags + + # Team that owns the service. + attr_accessor :team + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'contacts' => :'contacts', + :'dd_service' => :'dd-service', + :'dd_team' => :'dd-team', + :'docs' => :'docs', + :'extensions' => :'extensions', + :'integrations' => :'integrations', + :'links' => :'links', + :'repos' => :'repos', + :'schema_version' => :'schema-version', + :'tags' => :'tags', + :'team' => :'team' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'contacts' => :'Array', + :'dd_service' => :'String', + :'dd_team' => :'String', + :'docs' => :'Array', + :'extensions' => :'Hash', + :'integrations' => :'ServiceDefinitionV2Integrations', + :'links' => :'Array', + :'repos' => :'Array', + :'schema_version' => :'ServiceDefinitionV2Version', + :'tags' => :'Array', + :'team' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV2` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'contacts') + if (value = attributes[:'contacts']).is_a?(Array) + self.contacts = value + end + end + + if attributes.key?(:'dd_service') + self.dd_service = attributes[:'dd_service'] + end + + if attributes.key?(:'dd_team') + self.dd_team = attributes[:'dd_team'] + end + + if attributes.key?(:'docs') + if (value = attributes[:'docs']).is_a?(Array) + self.docs = value + end + end + + if attributes.key?(:'extensions') + self.extensions = attributes[:'extensions'] + end + + if attributes.key?(:'integrations') + self.integrations = attributes[:'integrations'] + end + + if attributes.key?(:'links') + if (value = attributes[:'links']).is_a?(Array) + self.links = value + end + end + + if attributes.key?(:'repos') + if (value = attributes[:'repos']).is_a?(Array) + self.repos = value + end + end + + if attributes.key?(:'schema_version') + self.schema_version = attributes[:'schema_version'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'team') + self.team = attributes[:'team'] + 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 @dd_service.nil? + return false if @schema_version.nil? + true + end + + # Custom attribute writer method with validation + # @param dd_service [Object] Object to be assigned + # @!visibility private + def dd_service=(dd_service) + if dd_service.nil? + fail ArgumentError, 'invalid value for "dd_service", dd_service cannot be nil.' + end + @dd_service = dd_service + end + + # Custom attribute writer method with validation + # @param schema_version [Object] Object to be assigned + # @!visibility private + def schema_version=(schema_version) + if schema_version.nil? + fail ArgumentError, 'invalid value for "schema_version", schema_version cannot be nil.' + end + @schema_version = schema_version + 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 && + contacts == o.contacts && + dd_service == o.dd_service && + dd_team == o.dd_team && + docs == o.docs && + extensions == o.extensions && + integrations == o.integrations && + links == o.links && + repos == o.repos && + schema_version == o.schema_version && + tags == o.tags && + team == o.team + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [contacts, dd_service, dd_team, docs, extensions, integrations, links, repos, schema_version, tags, team].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_contact.rb b/lib/datadog_api_client/v2/models/service_definition_v2_contact.rb new file mode 100644 index 000000000000..a0ae70e07be5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_contact.rb @@ -0,0 +1,63 @@ +=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 + # Service owner's contacts information. + module ServiceDefinitionV2Contact + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ServiceDefinitionV2Email', + :'ServiceDefinitionV2Slack' + ] + end + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb b/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb new file mode 100644 index 000000000000..005dc524da56 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb @@ -0,0 +1,153 @@ +=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 + # Service documents. + class ServiceDefinitionV2Doc + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Document name. + attr_accessor :name + + # Document provider. + attr_accessor :provider + + # Document URL. + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'provider' => :'provider', + :'url' => :'url' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'provider' => :'String', + :'url' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV2Doc` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Doc`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'provider') + self.provider = attributes[:'provider'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + 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 @name.nil? + return false if @url.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param url [Object] Object to be assigned + # @!visibility private + def url=(url) + if url.nil? + fail ArgumentError, 'invalid value for "url", url cannot be nil.' + end + @url = url + 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 && + provider == o.provider && + url == o.url + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, provider, url].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_email.rb b/lib/datadog_api_client/v2/models/service_definition_v2_email.rb new file mode 100644 index 000000000000..9f81f726500a --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_email.rb @@ -0,0 +1,153 @@ +=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 + # Service owner's email. + class ServiceDefinitionV2Email + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Contact value. + attr_accessor :contact + + # Contact email. + attr_accessor :name + + # Contact type. + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'contact' => :'contact', + :'name' => :'name', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'contact' => :'String', + :'name' => :'String', + :'type' => :'ServiceDefinitionV2EmailType' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV2Email` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Email`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'contact') + self.contact = attributes[:'contact'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 @contact.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param contact [Object] Object to be assigned + # @!visibility private + def contact=(contact) + if contact.nil? + fail ArgumentError, 'invalid value for "contact", contact cannot be nil.' + end + @contact = contact + 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 + + # 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 && + contact == o.contact && + name == o.name && + type == o.type + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [contact, name, type].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_email_type.rb b/lib/datadog_api_client/v2/models/service_definition_v2_email_type.rb new file mode 100644 index 000000000000..344e9b128b4a --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_email_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 + # Contact type. + class ServiceDefinitionV2EmailType + include BaseEnumModel + + EMAIL = "email".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb b/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb new file mode 100644 index 000000000000..0d416734f873 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb @@ -0,0 +1,121 @@ +=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 + # Third party integrations that Datadog supports. + class ServiceDefinitionV2Integrations + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Opsgenie integration for the service. + attr_accessor :opsgenie + + # PagerDuty service URL for the service. + attr_accessor :pagerduty + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'opsgenie' => :'opsgenie', + :'pagerduty' => :'pagerduty' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'opsgenie' => :'ServiceDefinitionV2Opsgenie', + :'pagerduty' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV2Integrations` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Integrations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'opsgenie') + self.opsgenie = attributes[:'opsgenie'] + end + + if attributes.key?(:'pagerduty') + self.pagerduty = attributes[:'pagerduty'] + 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? + true + 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 && + opsgenie == o.opsgenie && + pagerduty == o.pagerduty + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [opsgenie, pagerduty].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_link.rb b/lib/datadog_api_client/v2/models/service_definition_v2_link.rb new file mode 100644 index 000000000000..444908aec60f --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_link.rb @@ -0,0 +1,164 @@ +=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 + # Service's external links. + class ServiceDefinitionV2Link + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Link name. + attr_accessor :name + + # Link type. + attr_accessor :type + + # Link URL. + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'type' => :'type', + :'url' => :'url' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'type' => :'ServiceDefinitionV2LinkType', + :'url' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV2Link` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Link`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + 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 @name.nil? + return false if @type.nil? + return false if @url.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + 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 url [Object] Object to be assigned + # @!visibility private + def url=(url) + if url.nil? + fail ArgumentError, 'invalid value for "url", url cannot be nil.' + end + @url = url + 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 && + type == o.type && + url == o.url + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, type, url].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_link_type.rb b/lib/datadog_api_client/v2/models/service_definition_v2_link_type.rb new file mode 100644 index 000000000000..8caa0ce62ada --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_link_type.rb @@ -0,0 +1,34 @@ +=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 + # Link type. + class ServiceDefinitionV2LinkType + include BaseEnumModel + + DOC = "doc".freeze + WIKI = "wiki".freeze + RUNBOOK = "runbook".freeze + URL = "url".freeze + REPO = "repo".freeze + DASHBOARD = "dashboard".freeze + ONCALL = "oncall".freeze + CODE = "code".freeze + LINK = "link".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb b/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb new file mode 100644 index 000000000000..d7c224393b93 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb @@ -0,0 +1,132 @@ +=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 + # Opsgenie integration for the service. + class ServiceDefinitionV2Opsgenie + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Opsgenie instance region. + attr_accessor :region + + # Opsgenie service id. + attr_accessor :service_id + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'region' => :'region', + :'service_id' => :'service-id' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'region' => :'ServiceDefinitionV2OpsgenieRegion', + :'service_id' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV2Opsgenie` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Opsgenie`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + + if attributes.key?(:'service_id') + self.service_id = attributes[:'service_id'] + 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 @service_id.nil? + true + end + + # Custom attribute writer method with validation + # @param service_id [Object] Object to be assigned + # @!visibility private + def service_id=(service_id) + if service_id.nil? + fail ArgumentError, 'invalid value for "service_id", service_id cannot be nil.' + end + @service_id = service_id + 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 && + region == o.region && + service_id == o.service_id + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [region, service_id].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie_region.rb b/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie_region.rb new file mode 100644 index 000000000000..cbbcb78e9f71 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie_region.rb @@ -0,0 +1,27 @@ +=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 + # Opsgenie instance region. + class ServiceDefinitionV2OpsgenieRegion + include BaseEnumModel + + US = "US".freeze + EU = "EU".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb b/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb new file mode 100644 index 000000000000..f6753c11ed76 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb @@ -0,0 +1,153 @@ +=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 + # Service code repositories. + class ServiceDefinitionV2Repo + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Repository name. + attr_accessor :name + + # Repository provider. + attr_accessor :provider + + # Repository URL. + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'provider' => :'provider', + :'url' => :'url' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'provider' => :'String', + :'url' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV2Repo` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Repo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'provider') + self.provider = attributes[:'provider'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + 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 @name.nil? + return false if @url.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param url [Object] Object to be assigned + # @!visibility private + def url=(url) + if url.nil? + fail ArgumentError, 'invalid value for "url", url cannot be nil.' + end + @url = url + 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 && + provider == o.provider && + url == o.url + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, provider, url].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb b/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb new file mode 100644 index 000000000000..c074b4f31caa --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb @@ -0,0 +1,153 @@ +=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 + # Service owner's slack channel. + class ServiceDefinitionV2Slack + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Slack Channel. + attr_accessor :contact + + # Contact Slack. + attr_accessor :name + + # Contact type. + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'contact' => :'contact', + :'name' => :'name', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'contact' => :'String', + :'name' => :'String', + :'type' => :'ServiceDefinitionV2SlackType' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionV2Slack` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionV2Slack`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'contact') + self.contact = attributes[:'contact'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 @contact.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param contact [Object] Object to be assigned + # @!visibility private + def contact=(contact) + if contact.nil? + fail ArgumentError, 'invalid value for "contact", contact cannot be nil.' + end + @contact = contact + 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 + + # 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 && + contact == o.contact && + name == o.name && + type == o.type + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [contact, name, type].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_slack_type.rb b/lib/datadog_api_client/v2/models/service_definition_v2_slack_type.rb new file mode 100644 index 000000000000..c7a2c4b5c938 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_slack_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 + # Contact type. + class ServiceDefinitionV2SlackType + include BaseEnumModel + + SLACK = "slack".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_version.rb b/lib/datadog_api_client/v2/models/service_definition_v2_version.rb new file mode 100644 index 000000000000..2e840732ac60 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definition_v2_version.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 + # Schema version being used. + class ServiceDefinitionV2Version + include BaseEnumModel + + V2 = "v2".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_definitions_create_request.rb b/lib/datadog_api_client/v2/models/service_definitions_create_request.rb new file mode 100644 index 000000000000..f83b706f46a7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definitions_create_request.rb @@ -0,0 +1,63 @@ +=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 + # Create service definitions request. + module ServiceDefinitionsCreateRequest + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ServiceDefinitionV2', + :'String' + ] + end + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_definitions_create_response.rb b/lib/datadog_api_client/v2/models/service_definitions_create_response.rb new file mode 100644 index 000000000000..a37dcee15c5d --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_definitions_create_response.rb @@ -0,0 +1,113 @@ +=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 + # Create service definitions response. + class ServiceDefinitionsCreateResponse + include BaseGenericModel + + # Whether the object has unparsed attributes + # @!visibility private + attr_accessor :_unparsed + + # Data representing service definitions. + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + # @!visibility private + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + ]) + 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::ServiceDefinitionsCreateResponse` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionsCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + true + 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 + end + + # @see the `==` method + # @param o [Object] Object to be compared + # @!visibility private + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data].hash + end + end +end From acab9b15f5a3e2b17f2c9070a88ec4c295b27979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Herv=C3=A9?= Date: Tue, 11 Oct 2022 09:49:05 +0200 Subject: [PATCH 2/4] Fix tests lookup --- features/support/templating.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/support/templating.rb b/features/support/templating.rb index 3510e04dcb24..b79eb63aadb6 100644 --- a/features/support/templating.rb +++ b/features/support/templating.rb @@ -16,7 +16,7 @@ def lookup(dotted_path) when Hash result = result[part.to_sym] rescue result[part] else - result = result.send(part) + result = result.send(part.snakecase) end end end From 052714372081e8591b9756c24210341680b4be37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Herv=C3=A9?= Date: Wed, 12 Oct 2022 09:18:45 +0200 Subject: [PATCH 3/4] Fix examples --- .generator/src/generator/formatter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.generator/src/generator/formatter.py b/.generator/src/generator/formatter.py index 08477e3422bf..2f32aa6994f4 100644 --- a/.generator/src/generator/formatter.py +++ b/.generator/src/generator/formatter.py @@ -282,7 +282,7 @@ def format_data_with_schema_list( replace_values=replace_values, default_name=name, ) - except (KeyError, ValueError) as e: + except (KeyError, ValueError): continue return value raise ValueError(f"{data} is not valid oneOf {schema}") @@ -351,6 +351,8 @@ def format_data_with_schema_dict( parameters = _format_oneof(data, schema, name_prefix=name_prefix, replace_values=replace_values) if name == "dict": + if not parameters and data: + parameters = ", ".join(f"{k}: \"{v}\"" for k, v in data.items()) return f"{{\n{parameters}}}" elif name: return f"{name_prefix}{name}.new({{\n{parameters}}})" From 5c2d85abad4b0ad122d7a9309f07ff5b5e42b13d Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 12 Oct 2022 15:57:05 +0000 Subject: [PATCH 4/4] Regenerate client from commit 9f80a9c5 of spec repo --- .apigentools-info | 8 ++--- .generator/schemas/v2/openapi.yaml | 34 +++++++++---------- ...definition-returns-CREATED-response.frozen | 2 +- ...ce-definition-returns-CREATED-response.yml | 24 +++++++------ ...service-definition-returns-OK-response.yml | 2 +- ...service-definition-returns-OK-response.yml | 2 +- .../CreateOrUpdateServiceDefinitions.rb | 4 ++- features/v2/given.json | 2 +- features/v2/service_definition.feature | 2 +- lib/datadog_api_client/inflector.rb | 4 +-- .../v2/api/service_definition_api.rb | 8 ++--- ... => service_definition_create_response.rb} | 23 +++---------- .../v2/models/service_definition_data.rb | 13 ------- .../service_definition_data_attributes.rb | 13 ------- .../models/service_definition_get_response.rb | 13 ------- .../v2/models/service_definition_meta.rb | 13 ------- .../v2/models/service_definition_v1.rb | 13 ------- .../models/service_definition_v1_contact.rb | 15 +------- .../v2/models/service_definition_v1_info.rb | 13 ------- .../service_definition_v1_integrations.rb | 15 +------- .../v2/models/service_definition_v1_org.rb | 15 +------- .../models/service_definition_v1_resource.rb | 13 ------- .../models/service_definition_v1_version.rb | 2 +- .../v2/models/service_definition_v2.rb | 13 ------- .../v2/models/service_definition_v2_doc.rb | 13 ------- .../v2/models/service_definition_v2_email.rb | 13 ------- .../service_definition_v2_integrations.rb | 13 ------- .../v2/models/service_definition_v2_link.rb | 13 ------- .../models/service_definition_v2_opsgenie.rb | 13 ------- .../v2/models/service_definition_v2_repo.rb | 13 ------- .../v2/models/service_definition_v2_slack.rb | 15 +------- ...b => service_definitions_list_response.rb} | 19 ++--------- 32 files changed, 61 insertions(+), 317 deletions(-) rename lib/datadog_api_client/v2/models/{service_definition_list_response.rb => service_definition_create_response.rb} (78%) rename lib/datadog_api_client/v2/models/{service_definitions_create_response.rb => service_definitions_list_response.rb} (81%) diff --git a/.apigentools-info b/.apigentools-info index bd5d69872531..bcc17dc0c8a0 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2022-10-10 16:37:03.989417", - "spec_repo_commit": "49db3b7a" + "regenerated": "2022-10-12 15:56:43.725329", + "spec_repo_commit": "9f80a9c5" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2022-10-10 16:37:04.001409", - "spec_repo_commit": "49db3b7a" + "regenerated": "2022-10-12 15:56:43.737995", + "spec_repo_commit": "9f80a9c5" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2f96dba665fa..da02a9204bd0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -8379,6 +8379,15 @@ components: required: - data type: object + ServiceDefinitionCreateResponse: + description: Create service definitions response. + properties: + data: + description: Create service definitions response payload. + items: + $ref: '#/components/schemas/ServiceDefinitionData' + type: array + type: object ServiceDefinitionData: description: Service definition data. properties: @@ -8402,15 +8411,6 @@ components: data: $ref: '#/components/schemas/ServiceDefinitionData' type: object - ServiceDefinitionListResponse: - description: Get service definitions response. - properties: - data: - description: Get service definitions response payload. - items: - $ref: '#/components/schemas/ServiceDefinitionData' - type: array - type: object ServiceDefinitionMeta: description: Metadata about a service definition. properties: @@ -8490,7 +8490,7 @@ components: format: email type: string slack: - description: "Service owner\u2019s slack channel." + description: "Service owner\u2019s Slack channel." example: https://yourcompany.slack.com/archives/channel123 type: string ServiceDefinitionV1Info: @@ -8526,7 +8526,7 @@ components: description: Org related information about the service. properties: application: - description: App feature for which this service supports. + description: App feature this service supports. example: E-Commerce type: string team: @@ -8535,7 +8535,7 @@ components: type: string type: object ServiceDefinitionV1Pagerduty: - description: PagerDuty service url for the service. + description: PagerDuty service URL for the service. example: https://my-org.pagerduty.com/service-directory/PMyService type: string ServiceDefinitionV1Resource: @@ -8588,7 +8588,7 @@ components: example: v1 type: string x-enum-varnames: - - v1 + - V1 ServiceDefinitionV2: description: Service definition V2 for providing service metadata and integrations. properties: @@ -8794,7 +8794,7 @@ components: - url type: object ServiceDefinitionV2Slack: - description: Service owner's slack channel. + description: Service owner's Slack channel. properties: contact: description: Slack Channel. @@ -8832,7 +8832,7 @@ components: oneOf: - $ref: '#/components/schemas/ServiceDefinitionV2' - $ref: '#/components/schemas/ServiceDefinitionRaw' - ServiceDefinitionsCreateResponse: + ServiceDefinitionsListResponse: description: Create service definitions response. properties: data: @@ -14400,7 +14400,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ServiceDefinitionsCreateResponse' + $ref: '#/components/schemas/ServiceDefinitionsListResponse' description: OK '403': $ref: '#/components/responses/ForbiddenResponse' @@ -14424,7 +14424,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ServiceDefinitionListResponse' + $ref: '#/components/schemas/ServiceDefinitionCreateResponse' description: CREATED '400': $ref: '#/components/responses/BadRequestResponse' diff --git a/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.frozen b/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.frozen index d26456f4e0fc..73a4725426b0 100644 --- a/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.frozen +++ b/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.frozen @@ -1 +1 @@ -2022-10-10T10:16:22.954Z \ No newline at end of file +2022-10-11T16:11:15.904Z \ No newline at end of file diff --git a/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.yml b/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.yml index 9ca4c6e470cb..01e32ac34345 100644 --- a/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.yml +++ b/cassettes/features/v2/service_definition/Create-or-update-service-definition-returns-CREATED-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Mon, 10 Oct 2022 10:16:22 GMT +- recorded_at: Tue, 11 Oct 2022 16:11:15 GMT request: body: encoding: UTF-8 - string: '{"contacts":[{"contact":"contact@datadoghq.com","name":"Team Email","type":"email"}],"dd-service":"service-Test-Create_or_update_service_definition_returns_CREATED_response-1665396982","dd-team":"my-team","docs":[{"name":"Architecture","provider":"google - drive","url":"https://gdrive/mydoc"}],"extensions":{"myorg/extension":"extensionValue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source + string: '{"contacts":[{"contact":"contact@datadoghq.com","name":"Team Email","type":"email"}],"dd-service":"service-Test-Create_or_update_service_definition_returns_CREATED_response-1665504675","dd-team":"my-team","docs":[{"name":"Architecture","provider":"google + drive","url":"https://gdrive/mydoc"}],"extensions":{"myorgextension":"extensionvalue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source Code","provider":"GitHub","url":"https://github.com/DataDog/schema"}],"schema-version":"v2","tags":["my:tag","service:tag"],"team":"my-team"}' headers: Accept: @@ -16,10 +16,10 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-10T10:16:23.361540446Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[{"contact":"contact@datadoghq.com","type":"email","name":"Team + string: '{"data":[{"attributes":{"meta":{"ingested-schema-version":"v2","ingestion-source":"api","last-modified-time":"2022-10-11T16:11:16.302119241Z","github-html-url":"","warnings":[]},"schema":{"links":[{"url":"https://my-runbook","type":"runbook","name":"Runbook"}],"contacts":[{"contact":"contact@datadoghq.com","type":"email","name":"Team Email"}],"docs":[{"url":"https://gdrive/mydoc","name":"Architecture","provider":"google drive"}],"repos":[{"url":"https://github.com/DataDog/schema","name":"Source - Code","provider":"GitHub"}],"tags":["my:tag","service:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"my-team","extensions":{},"dd-service":"service-test-create_or_update_service_definition_returns_created_response-1665396982"}},"type":"service-definition"}]} + Code","provider":"GitHub"}],"tags":["my:tag","service:tag"],"dd-team":"my-team","integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"schema-version":"v2","team":"my-team","extensions":{},"dd-service":"service-test-create_or_update_service_definition_returns_created_response-1665504675"}},"type":"service-definition"}]} ' headers: @@ -28,22 +28,24 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 10 Oct 2022 10:16:22 GMT +- recorded_at: Tue, 11 Oct 2022 16:11:15 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/services/definitions/service-test-create_or_update_service_definition_returns_created_response-1665396982 + uri: https://api.datadoghq.com/api/v2/services/definitions/service-test-create_or_update_service_definition_returns_created_response-1665504675 response: body: encoding: UTF-8 - string: '' + string: '{"errors":["Not Found"],"error_details":[{}]} + + ' headers: Content-Type: - - text/html; charset=utf-8 + - application/json status: - code: 204 - message: No Content + code: 404 + message: Not Found recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.yml b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.yml index 34a5086bc196..45fa689bc09a 100644 --- a/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.yml +++ b/cassettes/features/v2/service_definition/Delete-a-single-service-definition-returns-OK-response.yml @@ -4,7 +4,7 @@ http_interactions: body: encoding: UTF-8 string: '{"dd-service":"service-Test-Delete_a_single_service_definition_returns_OK_response-1665406117","dd-team":"my-team","docs":[{"name":"Architecture","provider":"google - drive","url":"https://gdrive/mygivedoc"}],"extensions":{"frog/extension":"extensionFrogValue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source + drive","url":"https://gdrive/mygivedoc"}],"extensions":{"frogextension":"extensionfrogvalue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source Code","provider":"GitHub","url":"https://github.com/DataDog/given"}],"schema-version":"v2","tags":["this:tag","service:tag"],"team":"super-team"}' headers: Accept: diff --git a/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.yml b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.yml index 1e176804d7a6..353191933c1c 100644 --- a/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.yml +++ b/cassettes/features/v2/service_definition/Get-a-single-service-definition-returns-OK-response.yml @@ -4,7 +4,7 @@ http_interactions: body: encoding: UTF-8 string: '{"dd-service":"service-Test-Get_a_single_service_definition_returns_OK_response-1665405239","dd-team":"my-team","docs":[{"name":"Architecture","provider":"google - drive","url":"https://gdrive/mygivedoc"}],"extensions":{"frog/extension":"extensionFrogValue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source + drive","url":"https://gdrive/mygivedoc"}],"extensions":{"frogextension":"extensionfrogvalue"},"integrations":{"opsgenie":{"region":"US","service-id":"123e4567-e89b-12d3-a456-426614174000"},"pagerduty":"https://my-org.pagerduty.com/service-directory/PMyService"},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"}],"repos":[{"name":"Source Code","provider":"GitHub","url":"https://github.com/DataDog/given"}],"schema-version":"v2","tags":["this:tag","service:tag"],"team":"super-team"}' headers: Accept: diff --git a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb index ca1474032f2d..8fd8801fc1c4 100644 --- a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +++ b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb @@ -20,7 +20,9 @@ url: "https://gdrive/mydoc", }), ], - extensions: {}, + extensions: { + myorgextension: "extensionvalue", + }, integrations: DatadogAPIClient::V2::ServiceDefinitionV2Integrations.new({ opsgenie: DatadogAPIClient::V2::ServiceDefinitionV2Opsgenie.new({ region: DatadogAPIClient::V2::ServiceDefinitionV2OpsgenieRegion::US, diff --git a/features/v2/given.json b/features/v2/given.json index b5e5b0b893d8..4b4f179d1840 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -290,7 +290,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"dd-service\": \"service-{{ unique}}\",\n \"dd-team\": \"my-team\",\n \"docs\": [{\"name\": \"Architecture\",\n \"provider\": \"google drive\",\n \"url\": \"https://gdrive/mygivedoc\"}],\n \"extensions\": {\"frog/extension\": \"extensionFrogValue\"},\n \"integrations\": {\"opsgenie\": {\"region\": \"US\",\n \"service-id\": \"123e4567-e89b-12d3-a456-426614174000\"},\n \"pagerduty\": \"https://my-org.pagerduty.com/service-directory/PMyService\"},\n \"links\": [{\"name\": \"Runbook\", \"type\": \"runbook\", \"url\": \"https://my-runbook\"}],\n \"repos\": [{\"name\": \"Source Code\",\n \"provider\": \"GitHub\",\n \"url\": \"https://github.com/DataDog/given\"}],\n \"schema-version\": \"v2\",\n \"tags\": [\"this:tag\", \"service:tag\"],\n \"team\": \"super-team\"\n}" + "value": "{\n \"dd-service\": \"service-{{ unique}}\",\n \"dd-team\": \"my-team\",\n \"docs\": [{\"name\": \"Architecture\",\n \"provider\": \"google drive\",\n \"url\": \"https://gdrive/mygivedoc\"}],\n \"extensions\": {\"frogextension\": \"extensionfrogvalue\"},\n \"integrations\": {\"opsgenie\": {\"region\": \"US\",\n \"service-id\": \"123e4567-e89b-12d3-a456-426614174000\"},\n \"pagerduty\": \"https://my-org.pagerduty.com/service-directory/PMyService\"},\n \"links\": [{\"name\": \"Runbook\", \"type\": \"runbook\", \"url\": \"https://my-runbook\"}],\n \"repos\": [{\"name\": \"Source Code\",\n \"provider\": \"GitHub\",\n \"url\": \"https://github.com/DataDog/given\"}],\n \"schema-version\": \"v2\",\n \"tags\": [\"this:tag\", \"service:tag\"],\n \"team\": \"super-team\"\n}" } ], "step": "there is a valid \"service_definition\" in the system", diff --git a/features/v2/service_definition.feature b/features/v2/service_definition.feature index 8b1e5dd6e0a9..ce38544c4005 100644 --- a/features/v2/service_definition.feature +++ b/features/v2/service_definition.feature @@ -17,7 +17,7 @@ Feature: Service Definition @team:DataDog/apm-insights Scenario: Create or update service definition returns "CREATED" response Given new "CreateOrUpdateServiceDefinitions" request - And body with value {"contacts": [{"contact": "contact@datadoghq.com", "name": "Team Email", "type": "email"}], "dd-service": "service-{{ unique }}", "dd-team": "my-team", "docs": [{"name": "Architecture", "provider": "google drive", "url": "https://gdrive/mydoc"}], "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-id": "123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": "https://my-org.pagerduty.com/service-directory/PMyService"}, "links": [{"name": "Runbook", "type": "runbook", "url": "https://my-runbook"}], "repos": [{"name": "Source Code", "provider": "GitHub", "url": "https://github.com/DataDog/schema"}], "schema-version": "v2", "tags": ["my:tag", "service:tag"], "team": "my-team"} + And body with value {"contacts": [{"contact": "contact@datadoghq.com", "name": "Team Email", "type": "email"}], "dd-service": "service-{{ unique }}", "dd-team": "my-team", "docs": [{"name": "Architecture", "provider": "google drive", "url": "https://gdrive/mydoc"}], "extensions": {"myorgextension": "extensionvalue"}, "integrations": {"opsgenie": {"region": "US", "service-id": "123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": "https://my-org.pagerduty.com/service-directory/PMyService"}, "links": [{"name": "Runbook", "type": "runbook", "url": "https://my-runbook"}], "repos": [{"name": "Source Code", "provider": "GitHub", "url": "https://github.com/DataDog/schema"}], "schema-version": "v2", "tags": ["my:tag", "service:tag"], "team": "my-team"} When the request is sent Then the response status is 200 CREATED And the response "data[0].attributes.meta.ingested-schema-version" is equal to "v2" diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 32be68d36844..df077bdfb03b 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1271,14 +1271,14 @@ def overrides "v2.service_account_create_attributes" => "ServiceAccountCreateAttributes", "v2.service_account_create_data" => "ServiceAccountCreateData", "v2.service_account_create_request" => "ServiceAccountCreateRequest", + "v2.service_definition_create_response" => "ServiceDefinitionCreateResponse", "v2.service_definition_data" => "ServiceDefinitionData", "v2.service_definition_data_attributes" => "ServiceDefinitionDataAttributes", "v2.service_definition_get_response" => "ServiceDefinitionGetResponse", - "v2.service_definition_list_response" => "ServiceDefinitionListResponse", "v2.service_definition_meta" => "ServiceDefinitionMeta", "v2.service_definition_schema" => "ServiceDefinitionSchema", "v2.service_definitions_create_request" => "ServiceDefinitionsCreateRequest", - "v2.service_definitions_create_response" => "ServiceDefinitionsCreateResponse", + "v2.service_definitions_list_response" => "ServiceDefinitionsListResponse", "v2.service_definition_v1" => "ServiceDefinitionV1", "v2.service_definition_v1_contact" => "ServiceDefinitionV1Contact", "v2.service_definition_v1_info" => "ServiceDefinitionV1Info", diff --git a/lib/datadog_api_client/v2/api/service_definition_api.rb b/lib/datadog_api_client/v2/api/service_definition_api.rb index 13cbf0ead709..fdecd86532cf 100644 --- a/lib/datadog_api_client/v2/api/service_definition_api.rb +++ b/lib/datadog_api_client/v2/api/service_definition_api.rb @@ -37,7 +37,7 @@ def create_or_update_service_definitions(body, opts = {}) # # @param body [ServiceDefinitionsCreateRequest] Service Definition YAML/JSON. # @param opts [Hash] the optional parameters - # @return [Array<(ServiceDefinitionListResponse, Integer, Hash)>] ServiceDefinitionListResponse data, response status code and response headers + # @return [Array<(ServiceDefinitionCreateResponse, Integer, Hash)>] ServiceDefinitionCreateResponse data, response status code and response headers def create_or_update_service_definitions_with_http_info(body, opts = {}) if @api_client.config.debugging @@ -67,7 +67,7 @@ def create_or_update_service_definitions_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'ServiceDefinitionListResponse' + return_type = opts[:debug_return_type] || 'ServiceDefinitionCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] @@ -233,7 +233,7 @@ def list_service_definitions(opts = {}) # Get a list of all service definitions from the Datadog Service Catalog. # # @param opts [Hash] the optional parameters - # @return [Array<(ServiceDefinitionsCreateResponse, Integer, Hash)>] ServiceDefinitionsCreateResponse data, response status code and response headers + # @return [Array<(ServiceDefinitionsListResponse, Integer, Hash)>] ServiceDefinitionsListResponse data, response status code and response headers def list_service_definitions_with_http_info(opts = {}) if @api_client.config.debugging @@ -257,7 +257,7 @@ def list_service_definitions_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ServiceDefinitionsCreateResponse' + return_type = opts[:debug_return_type] || 'ServiceDefinitionsListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] diff --git a/lib/datadog_api_client/v2/models/service_definition_list_response.rb b/lib/datadog_api_client/v2/models/service_definition_create_response.rb similarity index 78% rename from lib/datadog_api_client/v2/models/service_definition_list_response.rb rename to lib/datadog_api_client/v2/models/service_definition_create_response.rb index 62808c7f37fa..fe1fb3b7db0b 100644 --- a/lib/datadog_api_client/v2/models/service_definition_list_response.rb +++ b/lib/datadog_api_client/v2/models/service_definition_create_response.rb @@ -17,15 +17,15 @@ require 'time' module DatadogAPIClient::V2 - # Get service definitions response. - class ServiceDefinitionListResponse + # Create service definitions response. + class ServiceDefinitionCreateResponse include BaseGenericModel # Whether the object has unparsed attributes # @!visibility private attr_accessor :_unparsed - # Get service definitions response payload. + # Create service definitions response payload. attr_accessor :data # Attribute mapping from ruby-style variable name to JSON key. @@ -36,12 +36,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -62,13 +56,13 @@ def self.openapi_nullable # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionCreateResponse` initialize method" end # 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -96,13 +90,6 @@ def ==(o) data == o.data end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_data.rb b/lib/datadog_api_client/v2/models/service_definition_data.rb index c5b85f9d3dd9..59b22d09f4d2 100644 --- a/lib/datadog_api_client/v2/models/service_definition_data.rb +++ b/lib/datadog_api_client/v2/models/service_definition_data.rb @@ -40,12 +40,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -104,13 +98,6 @@ def ==(o) type == o.type end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb b/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb index a7051f0ce973..dc5da9be3a91 100644 --- a/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/service_definition_data_attributes.rb @@ -40,12 +40,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -104,13 +98,6 @@ def ==(o) schema == o.schema end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_get_response.rb b/lib/datadog_api_client/v2/models/service_definition_get_response.rb index 8622a2439f13..bce695fee8ef 100644 --- a/lib/datadog_api_client/v2/models/service_definition_get_response.rb +++ b/lib/datadog_api_client/v2/models/service_definition_get_response.rb @@ -36,12 +36,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -94,13 +88,6 @@ def ==(o) data == o.data end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_meta.rb b/lib/datadog_api_client/v2/models/service_definition_meta.rb index 53b978e42f8a..c08bf0310b75 100644 --- a/lib/datadog_api_client/v2/models/service_definition_meta.rb +++ b/lib/datadog_api_client/v2/models/service_definition_meta.rb @@ -48,12 +48,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -124,13 +118,6 @@ def ==(o) last_modified_time == o.last_modified_time end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v1.rb b/lib/datadog_api_client/v2/models/service_definition_v1.rb index 9761f15babfa..2f2c5612bcea 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1.rb @@ -64,12 +64,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -190,13 +184,6 @@ def ==(o) tags == o.tags end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb b/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb index c78c7e801d84..5aca8d88d3df 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_contact.rb @@ -28,7 +28,7 @@ class ServiceDefinitionV1Contact # Service owner’s email. attr_accessor :email - # Service owner’s slack channel. + # Service owner’s Slack channel. attr_accessor :slack # Attribute mapping from ruby-style variable name to JSON key. @@ -40,12 +40,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -104,13 +98,6 @@ def ==(o) slack == o.slack end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_info.rb b/lib/datadog_api_client/v2/models/service_definition_v1_info.rb index 958d3114b90f..a31a132db94b 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_info.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_info.rb @@ -48,12 +48,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -135,13 +129,6 @@ def ==(o) service_tier == o.service_tier end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb b/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb index e10b41d68b91..921842497b4c 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_integrations.rb @@ -25,7 +25,7 @@ class ServiceDefinitionV1Integrations # @!visibility private attr_accessor :_unparsed - # PagerDuty service url for the service. + # PagerDuty service URL for the service. attr_accessor :pagerduty # Attribute mapping from ruby-style variable name to JSON key. @@ -36,12 +36,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -94,13 +88,6 @@ def ==(o) pagerduty == o.pagerduty end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_org.rb b/lib/datadog_api_client/v2/models/service_definition_v1_org.rb index 01d0d7a02ef3..30b87e898bb0 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_org.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_org.rb @@ -25,7 +25,7 @@ class ServiceDefinitionV1Org # @!visibility private attr_accessor :_unparsed - # App feature for which this service supports. + # App feature this service supports. attr_accessor :application # Team that owns the service. @@ -40,12 +40,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -104,13 +98,6 @@ def ==(o) team == o.team end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb b/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb index b310e5fa2176..37c5cfef6e46 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_resource.rb @@ -44,12 +44,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -147,13 +141,6 @@ def ==(o) url == o.url end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v1_version.rb b/lib/datadog_api_client/v2/models/service_definition_v1_version.rb index 2f99fce4b7f8..1876d8215b24 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v1_version.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v1_version.rb @@ -21,6 +21,6 @@ module DatadogAPIClient::V2 class ServiceDefinitionV1Version include BaseEnumModel - v1 = "v1".freeze + V1 = "v1".freeze end end diff --git a/lib/datadog_api_client/v2/models/service_definition_v2.rb b/lib/datadog_api_client/v2/models/service_definition_v2.rb index b421707cbbc3..9eb583659a2a 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2.rb @@ -76,12 +76,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -226,13 +220,6 @@ def ==(o) team == o.team end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb b/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb index 005dc524da56..08be2252eab6 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_doc.rb @@ -44,12 +44,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -136,13 +130,6 @@ def ==(o) url == o.url end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_email.rb b/lib/datadog_api_client/v2/models/service_definition_v2_email.rb index 9f81f726500a..958d0a3c2f84 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_email.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_email.rb @@ -44,12 +44,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -136,13 +130,6 @@ def ==(o) type == o.type end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb b/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb index 0d416734f873..aa1692cc854c 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_integrations.rb @@ -40,12 +40,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -104,13 +98,6 @@ def ==(o) pagerduty == o.pagerduty end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_link.rb b/lib/datadog_api_client/v2/models/service_definition_v2_link.rb index 444908aec60f..81f3becee4a3 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_link.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_link.rb @@ -44,12 +44,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -147,13 +141,6 @@ def ==(o) url == o.url end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb b/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb index d7c224393b93..cd50ed747b78 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb @@ -40,12 +40,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -115,13 +109,6 @@ def ==(o) service_id == o.service_id end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb b/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb index f6753c11ed76..169b06da313e 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_repo.rb @@ -44,12 +44,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -136,13 +130,6 @@ def ==(o) url == o.url end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb b/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb index c074b4f31caa..4a7b32972826 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_slack.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Service owner's slack channel. + # Service owner's Slack channel. class ServiceDefinitionV2Slack include BaseGenericModel @@ -44,12 +44,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -136,13 +130,6 @@ def ==(o) type == o.type end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private diff --git a/lib/datadog_api_client/v2/models/service_definitions_create_response.rb b/lib/datadog_api_client/v2/models/service_definitions_list_response.rb similarity index 81% rename from lib/datadog_api_client/v2/models/service_definitions_create_response.rb rename to lib/datadog_api_client/v2/models/service_definitions_list_response.rb index a37dcee15c5d..01ee960cb655 100644 --- a/lib/datadog_api_client/v2/models/service_definitions_create_response.rb +++ b/lib/datadog_api_client/v2/models/service_definitions_list_response.rb @@ -18,7 +18,7 @@ module DatadogAPIClient::V2 # Create service definitions response. - class ServiceDefinitionsCreateResponse + class ServiceDefinitionsListResponse include BaseGenericModel # Whether the object has unparsed attributes @@ -36,12 +36,6 @@ def self.attribute_map } end - # Returns all the JSON keys this model knows about - # @!visibility private - def self.acceptable_attributes - attribute_map.values - end - # Attribute type mapping. # @!visibility private def self.openapi_types @@ -62,13 +56,13 @@ def self.openapi_nullable # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionsCreateResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionsListResponse` initialize method" end # 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)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionsCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ServiceDefinitionsListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -96,13 +90,6 @@ def ==(o) data == o.data end - # @see the `==` method - # @param o [Object] Object to be compared - # @!visibility private - def eql?(o) - self == o - end - # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private