From a71345b8f9b3137b0ff7b8624bcfa19340ea35c8 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 18:36:56 +0100 Subject: [PATCH 1/2] Add the incident schema (#572) * Regenerate client from commit 96d901b of spec repo Co-authored-by: MRHwick Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec Co-authored-by: Jiri Kuncar --- .apigentools-info | 8 +- .github/workflows/test.yml | 2 +- api/v2/datadog/.openapi-generator/FILES | 62 + api/v2/datadog/README.md | 35 + api/v2/datadog/api/openapi.yaml | 1415 ++++++++++++++++- api/v2/datadog/api_incidents.go | 974 ++++++++++++ api/v2/datadog/client.go | 3 + api/v2/datadog/configuration.go | 5 + .../datadog/docs/IncidentCreateAttributes.md | 150 ++ api/v2/datadog/docs/IncidentCreateData.md | 98 ++ .../docs/IncidentCreateRelationships.md | 51 + api/v2/datadog/docs/IncidentCreateRequest.md | 51 + .../datadog/docs/IncidentFieldAttributes.md | 77 + .../IncidentFieldAttributesMultipleValue.md | 82 + .../IncidentFieldAttributesSingleValue.md | 82 + .../IncidentFieldAttributesSingleValueType.md | 13 + .../docs/IncidentFieldAttributesValueType.md | 17 + .../docs/IncidentIntegrationMetadataType.md | 11 + api/v2/datadog/docs/IncidentPostmortemType.md | 11 + api/v2/datadog/docs/IncidentResponse.md | 77 + .../docs/IncidentResponseAttributes.md | 543 +++++++ api/v2/datadog/docs/IncidentResponseData.md | 124 ++ .../docs/IncidentResponseIncludedItem.md | 30 + .../docs/IncidentResponseRelationships.md | 160 ++ .../IncidentTimelineCellCreateAttributes.md | 30 + ...IncidentTimelineCellMarkdownContentType.md | 11 + ...entTimelineCellMarkdownCreateAttributes.md | 98 ++ ...lineCellMarkdownCreateAttributesContent.md | 56 + api/v2/datadog/docs/IncidentType.md | 11 + .../datadog/docs/IncidentUpdateAttributes.md | 304 ++++ api/v2/datadog/docs/IncidentUpdateData.md | 124 ++ .../docs/IncidentUpdateRelationships.md | 160 ++ api/v2/datadog/docs/IncidentUpdateRequest.md | 51 + api/v2/datadog/docs/IncidentsApi.md | 436 +++++ api/v2/datadog/docs/IncidentsResponse.md | 103 ++ ...onshipToIncidentIntegrationMetadataData.md | 72 + ...ationshipToIncidentIntegrationMetadatas.md | 51 + .../docs/RelationshipToIncidentPostmortem.md | 51 + .../RelationshipToIncidentPostmortemData.md | 72 + .../model_incident_create_attributes.go | 246 +++ api/v2/datadog/model_incident_create_data.go | 171 ++ .../model_incident_create_relationships.go | 104 ++ .../datadog/model_incident_create_request.go | 104 ++ .../model_incident_field_attributes.go | 136 ++ ...ncident_field_attributes_multiple_value.go | 152 ++ ..._incident_field_attributes_single_value.go | 152 ++ ...dent_field_attributes_single_value_type.go | 81 + ...el_incident_field_attributes_value_type.go | 83 + ...odel_incident_integration_metadata_type.go | 80 + .../datadog/model_incident_postmortem_type.go | 80 + api/v2/datadog/model_incident_response.go | 141 ++ .../model_incident_response_attributes.go | 790 +++++++++ .../datadog/model_incident_response_data.go | 208 +++ .../model_incident_response_included_item.go | 108 ++ .../model_incident_response_relationships.go | 255 +++ ...ncident_timeline_cell_create_attributes.go | 108 ++ ...ent_timeline_cell_markdown_content_type.go | 80 + ...imeline_cell_markdown_create_attributes.go | 176 ++ ...cell_markdown_create_attributes_content.go | 112 ++ api/v2/datadog/model_incident_type.go | 80 + .../model_incident_update_attributes.go | 453 ++++++ api/v2/datadog/model_incident_update_data.go | 208 +++ .../model_incident_update_relationships.go | 255 +++ .../datadog/model_incident_update_request.go | 104 ++ api/v2/datadog/model_incidents_response.go | 178 +++ ...p_to_incident_integration_metadata_data.go | 136 ++ ...nship_to_incident_integration_metadatas.go | 105 ++ ...del_relationship_to_incident_postmortem.go | 104 ++ ...elationship_to_incident_postmortem_data.go | 136 ++ ...incident_returns__CREATED__response.freeze | 1 + ...w_incident_returns__CREATED__response.yaml | 214 +++ ...incident_returns__CREATED__response.freeze | 1 + ...n_incident_returns__CREATED__response.yaml | 171 ++ ...ting_incident_returns__OK__response.freeze | 1 + ...isting_incident_returns__OK__response.yaml | 178 +++ ..._of_incidents_returns__OK__response.freeze | 1 + ...st_of_incidents_returns__OK__response.yaml | 124 ++ ...f_an_incident_returns__OK__response.freeze | 1 + ..._of_an_incident_returns__OK__response.yaml | 124 ++ ...ting_incident_returns__OK__response.freeze | 1 + ...isting_incident_returns__OK__response.yaml | 127 ++ ..._service_returns__CREATED__response.freeze | 2 +- ...ew_service_returns__CREATED__response.yaml | 69 +- ...sting_service_returns__OK__response.freeze | 2 +- ...xisting_service_returns__OK__response.yaml | 48 +- ..._all_services_returns__OK__response.freeze | 2 +- ...of_all_services_returns__OK__response.yaml | 87 +- ..._of_a_service_returns__OK__response.freeze | 2 +- ...ls_of_a_service_returns__OK__response.yaml | 87 +- ...sting_service_returns__OK__response.freeze | 2 +- ...xisting_service_returns__OK__response.yaml | 89 +- ...new_team_returns__CREATED__response.freeze | 2 +- ...a_new_team_returns__CREATED__response.yaml | 69 +- ...existing_team_returns__OK__response.freeze | 2 +- ...n_existing_team_returns__OK__response.yaml | 48 +- ..._of_all_teams_returns__OK__response.freeze | 2 +- ...st_of_all_teams_returns__OK__response.yaml | 87 +- ...ils_of_a_team_returns__OK__response.freeze | 2 +- ...tails_of_a_team_returns__OK__response.yaml | 87 +- ...existing_team_returns__OK__response.freeze | 2 +- ...n_existing_team_returns__OK__response.yaml | 89 +- .../api/v2/datadog/features/incidents.feature | 50 + tests/api/v2/datadog/scenarios_test.go | 44 + 103 files changed, 12439 insertions(+), 216 deletions(-) create mode 100644 api/v2/datadog/api_incidents.go create mode 100644 api/v2/datadog/docs/IncidentCreateAttributes.md create mode 100644 api/v2/datadog/docs/IncidentCreateData.md create mode 100644 api/v2/datadog/docs/IncidentCreateRelationships.md create mode 100644 api/v2/datadog/docs/IncidentCreateRequest.md create mode 100644 api/v2/datadog/docs/IncidentFieldAttributes.md create mode 100644 api/v2/datadog/docs/IncidentFieldAttributesMultipleValue.md create mode 100644 api/v2/datadog/docs/IncidentFieldAttributesSingleValue.md create mode 100644 api/v2/datadog/docs/IncidentFieldAttributesSingleValueType.md create mode 100644 api/v2/datadog/docs/IncidentFieldAttributesValueType.md create mode 100644 api/v2/datadog/docs/IncidentIntegrationMetadataType.md create mode 100644 api/v2/datadog/docs/IncidentPostmortemType.md create mode 100644 api/v2/datadog/docs/IncidentResponse.md create mode 100644 api/v2/datadog/docs/IncidentResponseAttributes.md create mode 100644 api/v2/datadog/docs/IncidentResponseData.md create mode 100644 api/v2/datadog/docs/IncidentResponseIncludedItem.md create mode 100644 api/v2/datadog/docs/IncidentResponseRelationships.md create mode 100644 api/v2/datadog/docs/IncidentTimelineCellCreateAttributes.md create mode 100644 api/v2/datadog/docs/IncidentTimelineCellMarkdownContentType.md create mode 100644 api/v2/datadog/docs/IncidentTimelineCellMarkdownCreateAttributes.md create mode 100644 api/v2/datadog/docs/IncidentTimelineCellMarkdownCreateAttributesContent.md create mode 100644 api/v2/datadog/docs/IncidentType.md create mode 100644 api/v2/datadog/docs/IncidentUpdateAttributes.md create mode 100644 api/v2/datadog/docs/IncidentUpdateData.md create mode 100644 api/v2/datadog/docs/IncidentUpdateRelationships.md create mode 100644 api/v2/datadog/docs/IncidentUpdateRequest.md create mode 100644 api/v2/datadog/docs/IncidentsApi.md create mode 100644 api/v2/datadog/docs/IncidentsResponse.md create mode 100644 api/v2/datadog/docs/RelationshipToIncidentIntegrationMetadataData.md create mode 100644 api/v2/datadog/docs/RelationshipToIncidentIntegrationMetadatas.md create mode 100644 api/v2/datadog/docs/RelationshipToIncidentPostmortem.md create mode 100644 api/v2/datadog/docs/RelationshipToIncidentPostmortemData.md create mode 100644 api/v2/datadog/model_incident_create_attributes.go create mode 100644 api/v2/datadog/model_incident_create_data.go create mode 100644 api/v2/datadog/model_incident_create_relationships.go create mode 100644 api/v2/datadog/model_incident_create_request.go create mode 100644 api/v2/datadog/model_incident_field_attributes.go create mode 100644 api/v2/datadog/model_incident_field_attributes_multiple_value.go create mode 100644 api/v2/datadog/model_incident_field_attributes_single_value.go create mode 100644 api/v2/datadog/model_incident_field_attributes_single_value_type.go create mode 100644 api/v2/datadog/model_incident_field_attributes_value_type.go create mode 100644 api/v2/datadog/model_incident_integration_metadata_type.go create mode 100644 api/v2/datadog/model_incident_postmortem_type.go create mode 100644 api/v2/datadog/model_incident_response.go create mode 100644 api/v2/datadog/model_incident_response_attributes.go create mode 100644 api/v2/datadog/model_incident_response_data.go create mode 100644 api/v2/datadog/model_incident_response_included_item.go create mode 100644 api/v2/datadog/model_incident_response_relationships.go create mode 100644 api/v2/datadog/model_incident_timeline_cell_create_attributes.go create mode 100644 api/v2/datadog/model_incident_timeline_cell_markdown_content_type.go create mode 100644 api/v2/datadog/model_incident_timeline_cell_markdown_create_attributes.go create mode 100644 api/v2/datadog/model_incident_timeline_cell_markdown_create_attributes_content.go create mode 100644 api/v2/datadog/model_incident_type.go create mode 100644 api/v2/datadog/model_incident_update_attributes.go create mode 100644 api/v2/datadog/model_incident_update_data.go create mode 100644 api/v2/datadog/model_incident_update_relationships.go create mode 100644 api/v2/datadog/model_incident_update_request.go create mode 100644 api/v2/datadog/model_incidents_response.go create mode 100644 api/v2/datadog/model_relationship_to_incident_integration_metadata_data.go create mode 100644 api/v2/datadog/model_relationship_to_incident_integration_metadatas.go create mode 100644 api/v2/datadog/model_relationship_to_incident_postmortem.go create mode 100644 api/v2/datadog/model_relationship_to_incident_postmortem_data.go create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_a_new_incident_returns__CREATED__response.freeze create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_a_new_incident_returns__CREATED__response.yaml create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_an_incident_returns__CREATED__response.freeze create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_an_incident_returns__CREATED__response.yaml create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Delete_an_existing_incident_returns__OK__response.freeze create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Delete_an_existing_incident_returns__OK__response.yaml create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_a_list_of_incidents_returns__OK__response.freeze create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_a_list_of_incidents_returns__OK__response.yaml create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_the_details_of_an_incident_returns__OK__response.freeze create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_the_details_of_an_incident_returns__OK__response.yaml create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Update_an_existing_incident_returns__OK__response.freeze create mode 100644 tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Update_an_existing_incident_returns__OK__response.yaml create mode 100644 tests/api/v2/datadog/features/incidents.feature diff --git a/.apigentools-info b/.apigentools-info index f0cfc13a3c5..ae90e752bd6 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.3.0", - "regenerated": "2020-11-16 13:30:25.616174", - "spec_repo_commit": "b0b5ae5" + "regenerated": "2020-11-17 16:22:27.031496", + "spec_repo_commit": "96d901b" }, "v2": { "apigentools_version": "1.3.0", - "regenerated": "2020-11-16 13:30:31.099009", - "spec_repo_commit": "b0b5ae5" + "regenerated": "2020-11-17 16:22:32.970149", + "spec_repo_commit": "96d901b" } } } \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13eddf14ed5..7eb43a6fa8f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/') steps: - name: Install Go - uses: actions/setup-go@v2-beta + uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code diff --git a/api/v2/datadog/.openapi-generator/FILES b/api/v2/datadog/.openapi-generator/FILES index ce6d2031711..b859c5b0fc0 100644 --- a/api/v2/datadog/.openapi-generator/FILES +++ b/api/v2/datadog/.openapi-generator/FILES @@ -6,6 +6,7 @@ api/openapi.yaml api_dashboard_lists.go api_incident_services.go api_incident_teams.go +api_incidents.go api_logs.go api_logs_archives.go api_roles.go @@ -27,6 +28,22 @@ docs/DashboardListUpdateItemsRequest.md docs/DashboardListUpdateItemsResponse.md docs/DashboardListsApi.md docs/DashboardType.md +docs/IncidentCreateAttributes.md +docs/IncidentCreateData.md +docs/IncidentCreateRelationships.md +docs/IncidentCreateRequest.md +docs/IncidentFieldAttributes.md +docs/IncidentFieldAttributesMultipleValue.md +docs/IncidentFieldAttributesSingleValue.md +docs/IncidentFieldAttributesSingleValueType.md +docs/IncidentFieldAttributesValueType.md +docs/IncidentIntegrationMetadataType.md +docs/IncidentPostmortemType.md +docs/IncidentResponse.md +docs/IncidentResponseAttributes.md +docs/IncidentResponseData.md +docs/IncidentResponseIncludedItem.md +docs/IncidentResponseRelationships.md docs/IncidentServiceCreateAttributes.md docs/IncidentServiceCreateData.md docs/IncidentServiceCreateRequest.md @@ -57,6 +74,17 @@ docs/IncidentTeamUpdateData.md docs/IncidentTeamUpdateRequest.md docs/IncidentTeamsApi.md docs/IncidentTeamsResponse.md +docs/IncidentTimelineCellCreateAttributes.md +docs/IncidentTimelineCellMarkdownContentType.md +docs/IncidentTimelineCellMarkdownCreateAttributes.md +docs/IncidentTimelineCellMarkdownCreateAttributesContent.md +docs/IncidentType.md +docs/IncidentUpdateAttributes.md +docs/IncidentUpdateData.md +docs/IncidentUpdateRelationships.md +docs/IncidentUpdateRequest.md +docs/IncidentsApi.md +docs/IncidentsResponse.md docs/Log.md docs/LogAttributes.md docs/LogType.md @@ -123,6 +151,10 @@ docs/PermissionAttributes.md docs/PermissionsResponse.md docs/PermissionsType.md docs/QuerySortOrder.md +docs/RelationshipToIncidentIntegrationMetadataData.md +docs/RelationshipToIncidentIntegrationMetadatas.md +docs/RelationshipToIncidentPostmortem.md +docs/RelationshipToIncidentPostmortemData.md docs/RelationshipToOrganization.md docs/RelationshipToOrganizationData.md docs/RelationshipToOrganizations.md @@ -220,6 +252,22 @@ model_dashboard_list_items.go model_dashboard_list_update_items_request.go model_dashboard_list_update_items_response.go model_dashboard_type.go +model_incident_create_attributes.go +model_incident_create_data.go +model_incident_create_relationships.go +model_incident_create_request.go +model_incident_field_attributes.go +model_incident_field_attributes_multiple_value.go +model_incident_field_attributes_single_value.go +model_incident_field_attributes_single_value_type.go +model_incident_field_attributes_value_type.go +model_incident_integration_metadata_type.go +model_incident_postmortem_type.go +model_incident_response.go +model_incident_response_attributes.go +model_incident_response_data.go +model_incident_response_included_item.go +model_incident_response_relationships.go model_incident_service_create_attributes.go model_incident_service_create_data.go model_incident_service_create_request.go @@ -248,6 +296,16 @@ model_incident_team_update_attributes.go model_incident_team_update_data.go model_incident_team_update_request.go model_incident_teams_response.go +model_incident_timeline_cell_create_attributes.go +model_incident_timeline_cell_markdown_content_type.go +model_incident_timeline_cell_markdown_create_attributes.go +model_incident_timeline_cell_markdown_create_attributes_content.go +model_incident_type.go +model_incident_update_attributes.go +model_incident_update_data.go +model_incident_update_relationships.go +model_incident_update_request.go +model_incidents_response.go model_log.go model_log_attributes.go model_log_type.go @@ -312,6 +370,10 @@ model_permission_attributes.go model_permissions_response.go model_permissions_type.go model_query_sort_order.go +model_relationship_to_incident_integration_metadata_data.go +model_relationship_to_incident_integration_metadatas.go +model_relationship_to_incident_postmortem.go +model_relationship_to_incident_postmortem_data.go model_relationship_to_organization.go model_relationship_to_organization_data.go model_relationship_to_organizations.go diff --git a/api/v2/datadog/README.md b/api/v2/datadog/README.md index bd0a7623426..d8c889d39fa 100644 --- a/api/v2/datadog/README.md +++ b/api/v2/datadog/README.md @@ -93,6 +93,11 @@ Class | Method | HTTP request | Description *IncidentTeamsApi* | [**GetIncidentTeam**](docs/IncidentTeamsApi.md#getincidentteam) | **Get** /api/v2/teams/{team_id} | Get details of an incident team *IncidentTeamsApi* | [**ListIncidentTeams**](docs/IncidentTeamsApi.md#listincidentteams) | **Get** /api/v2/teams | Get a list of all incident teams *IncidentTeamsApi* | [**UpdateIncidentTeam**](docs/IncidentTeamsApi.md#updateincidentteam) | **Patch** /api/v2/teams/{team_id} | Update an existing incident team +*IncidentsApi* | [**CreateIncident**](docs/IncidentsApi.md#createincident) | **Post** /api/v2/incidents | Create an incident +*IncidentsApi* | [**DeleteIncident**](docs/IncidentsApi.md#deleteincident) | **Delete** /api/v2/incidents/{incident_id} | Delete an existing incident +*IncidentsApi* | [**GetIncident**](docs/IncidentsApi.md#getincident) | **Get** /api/v2/incidents/{incident_id} | Get the details of an incident +*IncidentsApi* | [**ListIncidents**](docs/IncidentsApi.md#listincidents) | **Get** /api/v2/incidents | Get a list of incidents +*IncidentsApi* | [**UpdateIncident**](docs/IncidentsApi.md#updateincident) | **Patch** /api/v2/incidents/{incident_id} | Update an existing incident *LogsApi* | [**AggregateLogs**](docs/LogsApi.md#aggregatelogs) | **Post** /api/v2/logs/analytics/aggregate | Aggregate events *LogsApi* | [**ListLogs**](docs/LogsApi.md#listlogs) | **Post** /api/v2/logs/events/search | Get a list of logs *LogsApi* | [**ListLogsGet**](docs/LogsApi.md#listlogsget) | **Get** /api/v2/logs/events | Get a quick list of logs @@ -151,6 +156,22 @@ Class | Method | HTTP request | Description - [DashboardListUpdateItemsRequest](docs/DashboardListUpdateItemsRequest.md) - [DashboardListUpdateItemsResponse](docs/DashboardListUpdateItemsResponse.md) - [DashboardType](docs/DashboardType.md) + - [IncidentCreateAttributes](docs/IncidentCreateAttributes.md) + - [IncidentCreateData](docs/IncidentCreateData.md) + - [IncidentCreateRelationships](docs/IncidentCreateRelationships.md) + - [IncidentCreateRequest](docs/IncidentCreateRequest.md) + - [IncidentFieldAttributes](docs/IncidentFieldAttributes.md) + - [IncidentFieldAttributesMultipleValue](docs/IncidentFieldAttributesMultipleValue.md) + - [IncidentFieldAttributesSingleValue](docs/IncidentFieldAttributesSingleValue.md) + - [IncidentFieldAttributesSingleValueType](docs/IncidentFieldAttributesSingleValueType.md) + - [IncidentFieldAttributesValueType](docs/IncidentFieldAttributesValueType.md) + - [IncidentIntegrationMetadataType](docs/IncidentIntegrationMetadataType.md) + - [IncidentPostmortemType](docs/IncidentPostmortemType.md) + - [IncidentResponse](docs/IncidentResponse.md) + - [IncidentResponseAttributes](docs/IncidentResponseAttributes.md) + - [IncidentResponseData](docs/IncidentResponseData.md) + - [IncidentResponseIncludedItem](docs/IncidentResponseIncludedItem.md) + - [IncidentResponseRelationships](docs/IncidentResponseRelationships.md) - [IncidentServiceCreateAttributes](docs/IncidentServiceCreateAttributes.md) - [IncidentServiceCreateData](docs/IncidentServiceCreateData.md) - [IncidentServiceCreateRequest](docs/IncidentServiceCreateRequest.md) @@ -179,6 +200,16 @@ Class | Method | HTTP request | Description - [IncidentTeamUpdateData](docs/IncidentTeamUpdateData.md) - [IncidentTeamUpdateRequest](docs/IncidentTeamUpdateRequest.md) - [IncidentTeamsResponse](docs/IncidentTeamsResponse.md) + - [IncidentTimelineCellCreateAttributes](docs/IncidentTimelineCellCreateAttributes.md) + - [IncidentTimelineCellMarkdownContentType](docs/IncidentTimelineCellMarkdownContentType.md) + - [IncidentTimelineCellMarkdownCreateAttributes](docs/IncidentTimelineCellMarkdownCreateAttributes.md) + - [IncidentTimelineCellMarkdownCreateAttributesContent](docs/IncidentTimelineCellMarkdownCreateAttributesContent.md) + - [IncidentType](docs/IncidentType.md) + - [IncidentUpdateAttributes](docs/IncidentUpdateAttributes.md) + - [IncidentUpdateData](docs/IncidentUpdateData.md) + - [IncidentUpdateRelationships](docs/IncidentUpdateRelationships.md) + - [IncidentUpdateRequest](docs/IncidentUpdateRequest.md) + - [IncidentsResponse](docs/IncidentsResponse.md) - [Log](docs/Log.md) - [LogAttributes](docs/LogAttributes.md) - [LogType](docs/LogType.md) @@ -243,6 +274,10 @@ Class | Method | HTTP request | Description - [PermissionsResponse](docs/PermissionsResponse.md) - [PermissionsType](docs/PermissionsType.md) - [QuerySortOrder](docs/QuerySortOrder.md) + - [RelationshipToIncidentIntegrationMetadataData](docs/RelationshipToIncidentIntegrationMetadataData.md) + - [RelationshipToIncidentIntegrationMetadatas](docs/RelationshipToIncidentIntegrationMetadatas.md) + - [RelationshipToIncidentPostmortem](docs/RelationshipToIncidentPostmortem.md) + - [RelationshipToIncidentPostmortemData](docs/RelationshipToIncidentPostmortemData.md) - [RelationshipToOrganization](docs/RelationshipToOrganization.md) - [RelationshipToOrganizationData](docs/RelationshipToOrganizationData.md) - [RelationshipToOrganizations](docs/RelationshipToOrganizations.md) diff --git a/api/v2/datadog/api/openapi.yaml b/api/v2/datadog/api/openapi.yaml index 7ac6d3efe82..0429df2db3f 100644 --- a/api/v2/datadog/api/openapi.yaml +++ b/api/v2/datadog/api/openapi.yaml @@ -43,6 +43,8 @@ tags: - description: Create, update, delete and retrieve teams which can be associated with incidents. name: Incident Teams +- description: Manage incident response. + name: Incidents - description: |- Search your logs in the Datadog platform over HTTP. @@ -259,6 +261,295 @@ paths: tags: - Dashboard Lists x-codegen-request-body-name: body + /api/v2/incidents: + get: + description: Get all incidents for the user's organization. + operationId: ListIncidents + parameters: + - description: Specifies which types of related objects should be included in + the response. + explode: false + in: query + name: include + required: false + schema: + items: + enum: + - users + type: string + type: array + style: form + - description: Size for a given page. + explode: true + in: query + name: page[size] + required: false + schema: + default: 10 + format: int64 + type: integer + style: form + - description: Specific offset to use as the beginning of the returned page. + explode: true + in: query + name: page[offset] + required: false + schema: + default: 0 + format: int64 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentsResponse' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + summary: Get a list of incidents + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create an incident. + operationId: CreateIncident + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentCreateRequest' + description: Incident payload. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentResponse' + description: CREATED + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + summary: Create an incident + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}: + delete: + description: Deletes an existing incident from the users organization. + operationId: DeleteIncident + parameters: + - description: The UUID the incident. + explode: false + in: path + name: incident_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + summary: Delete an existing incident + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of an incident by `incident_id`. + operationId: GetIncident + parameters: + - description: The UUID the incident. + explode: false + in: path + name: incident_id + required: true + schema: + type: string + style: simple + - description: Specifies which types of related objects should be included in + the response. + explode: false + in: query + name: include + required: false + schema: + items: + enum: + - users + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentResponse' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + summary: Get the details of an incident + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Updates an incident. Provide only the attributes that should be + updated as this request is a partial update. + operationId: UpdateIncident + parameters: + - description: The UUID the incident. + explode: false + in: path + name: incident_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentUpdateRequest' + description: Incident Payload. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentResponse' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + summary: Update an existing incident + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/logs/analytics/aggregate: post: description: The API endpoint to aggregate events into buckets and compute metrics @@ -2681,6 +2972,29 @@ components: schema: type: string style: simple + IncidentIDPathParameter: + description: The UUID the incident. + explode: false + in: path + name: incident_id + required: true + schema: + type: string + style: simple + IncidentIncludeQueryParameter: + description: Specifies which types of related objects should be included in + the response. + explode: false + in: query + name: include + required: false + schema: + items: + enum: + - users + type: string + type: array + style: form IncidentServiceIDPathParameter: description: The ID of the incident service. explode: false @@ -3039,34 +3353,549 @@ components: $ref: '#/components/schemas/DashboardListItemRequest' type: array type: object - DashboardListUpdateItemsResponse: - description: Response containing a list of updated dashboards. + DashboardListUpdateItemsResponse: + description: Response containing a list of updated dashboards. + example: + dashboards: + - id: q5j-nti-fv6 + - id: q5j-nti-fv6 + properties: + dashboards: + description: List of dashboards in the dashboard list. + items: + $ref: '#/components/schemas/DashboardListItemResponse' + type: array + type: object + DashboardType: + description: The type of the dashboard. + enum: + - custom_timeboard + - custom_screenboard + - integration_screenboard + - integration_timeboard + - host_timeboard + type: string + x-enum-varnames: + - CUSTOM_TIMEBOARD + - CUSTOM_SCREENBOARD + - INTEGRATION_SCREENBOARD + - INTEGRATION_TIMEBOARD + - HOST_TIMEBOARD + IncidentCreateAttributes: + description: The incident's attributes for a create request. + example: + initial_timeline_cells: + - null + - null + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + fields: + severity: + type: dropdown + value: SEV-5 + title: A test incident title + customer_impacted: false + properties: + customer_impacted: + description: A flag indicating whether the incident caused customer impact. + example: false + type: boolean + fields: + additionalProperties: + $ref: '#/components/schemas/IncidentFieldAttributes' + description: A condensed view of the user-defined fields for which to create + initial selections. + example: + severity: + type: dropdown + value: SEV-5 + type: object + initial_timeline_cells: + description: An array of initial timeline cells to be placed at the beginning + of the incident timeline. + items: + $ref: '#/components/schemas/IncidentTimelineCellCreateAttributes' + type: array + notification_handles: + description: Notification handles that will be notified of the incident + at creation. + items: + description: A notification handle that will be notified at incident creation. + example: '@test.user@test.com' + type: string + type: array + title: + description: The title of the incident, which summarizes what happened. + example: A test incident title + type: string + required: + - customer_impacted + - title + type: object + IncidentCreateData: + description: Incident data for a create request. + example: + relationships: + commander: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + attributes: + initial_timeline_cells: + - null + - null + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + fields: + severity: + type: dropdown + value: SEV-5 + title: A test incident title + customer_impacted: false + type: incidents + properties: + attributes: + $ref: '#/components/schemas/IncidentCreateAttributes' + relationships: + $ref: '#/components/schemas/IncidentCreateRelationships' + type: + $ref: '#/components/schemas/IncidentType' + required: + - attributes + - type + type: object + IncidentCreateRelationships: + description: The relationships the incident will have with other resources once + created. + example: + commander: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + properties: + commander: + $ref: '#/components/schemas/RelationshipToUser' + required: + - commander + type: object + IncidentCreateRequest: + description: Create request for an incident. + example: + data: + relationships: + commander: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + attributes: + initial_timeline_cells: + - null + - null + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + fields: + severity: + type: dropdown + value: SEV-5 + title: A test incident title + customer_impacted: false + type: incidents + properties: + data: + $ref: '#/components/schemas/IncidentCreateData' + required: + - data + type: object + IncidentFieldAttributes: + description: Dynamic fields for which selections can be made, with field names + as keys. + oneOf: + - $ref: '#/components/schemas/IncidentFieldAttributesSingleValue' + - $ref: '#/components/schemas/IncidentFieldAttributesMultipleValue' + required: + - type + type: object + IncidentFieldAttributesMultipleValue: + description: A field with potentially multiple values selected. + properties: + type: + $ref: '#/components/schemas/IncidentFieldAttributesValueType' + value: + description: The multiple values selected for this field. + example: + - "1.0" + - "1.1" + items: + description: A value which has been selected for the parent field. + example: "1.1" + type: string + type: array + type: object + IncidentFieldAttributesSingleValue: + description: A field with a single value selected. + properties: + type: + $ref: '#/components/schemas/IncidentFieldAttributesSingleValueType' + value: + description: The single value selected for this field. + example: SEV-1 + type: string + type: object + IncidentFieldAttributesSingleValueType: + default: dropdown + description: Type of the single value field definitions. + enum: + - dropdown + - textbox + example: dropdown + type: string + x-enum-varnames: + - DROPDOWN + - TEXTBOX + IncidentFieldAttributesValueType: + default: multiselect + description: Type of the single value field definitions. + enum: + - multiselect + - textarray + - metrictag + - autocomplete + example: multiselect + type: string + x-enum-varnames: + - MULTISELECT + - TEXTARRAY + - METRICTAG + - AUTOCOMPLETE + IncidentIntegrationMetadataType: + default: incident_integration_metadata + description: Integration metadata resource type. + enum: + - incident_integration_metadata + example: incident_integration_metadata + type: string + x-enum-varnames: + - INCIDENT_INTEGRATION_METADATA + IncidentPostmortemType: + default: incident_postmortems + description: Incident postmortem resource type. + enum: + - incident_postmortems + example: incident_postmortems + type: string + x-enum-varnames: + - INCIDENT_POSTMORTEMS + IncidentResponse: + description: Response with an incident. + example: + data: + relationships: + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + attributes: + time_to_repair: 5 + created: 2000-01-23T04:56:07.000+00:00 + time_to_internal_response: 1 + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + customer_impact_duration: 0 + title: A test incident title + public_id: 1 + time_to_detect: 6 + customer_impact_scope: An example customer impact scope + postmortem_id: 00000000-0000-0000-0000-000000000000 + customer_impact_end: 2000-01-23T04:56:07.000+00:00 + time_to_resolve: 5 + customer_impact_start: 2000-01-23T04:56:07.000+00:00 + detected: 2000-01-23T04:56:07.000+00:00 + modified: 2000-01-23T04:56:07.000+00:00 + fields: + severity: + type: dropdown + value: SEV-5 + customer_impacted: false + resolved: 2000-01-23T04:56:07.000+00:00 + id: 00000000-0000-0000-0000-000000000000 + type: incidents + included: + - null + - null + properties: + data: + $ref: '#/components/schemas/IncidentResponseData' + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentResponseIncludedItem' + readOnly: true + type: array + required: + - data + type: object + IncidentResponseAttributes: + description: The incident's attributes from a response. + example: + time_to_repair: 5 + created: 2000-01-23T04:56:07.000+00:00 + time_to_internal_response: 1 + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + customer_impact_duration: 0 + title: A test incident title + public_id: 1 + time_to_detect: 6 + customer_impact_scope: An example customer impact scope + postmortem_id: 00000000-0000-0000-0000-000000000000 + customer_impact_end: 2000-01-23T04:56:07.000+00:00 + time_to_resolve: 5 + customer_impact_start: 2000-01-23T04:56:07.000+00:00 + detected: 2000-01-23T04:56:07.000+00:00 + modified: 2000-01-23T04:56:07.000+00:00 + fields: + severity: + type: dropdown + value: SEV-5 + customer_impacted: false + resolved: 2000-01-23T04:56:07.000+00:00 + properties: + created: + description: Timestamp when the incident was created. + format: date-time + readOnly: true + type: string + customer_impact_duration: + description: Length of the incident's customer impact in seconds. Equals + the difference between `customer_impact_start` and `customer_impact_end`. + format: int64 + readOnly: true + type: integer + customer_impact_end: + description: Timestamp when customers were no longer impacted by the incident. + format: date-time + nullable: true + type: string + customer_impact_scope: + description: A summary of the impact customers experienced during the incident. + example: An example customer impact scope + nullable: true + type: string + customer_impact_start: + description: Timestamp when customers began being impacted by the incident. + format: date-time + nullable: true + type: string + customer_impacted: + description: A flag indicating whether the incident caused customer impact. + example: false + type: boolean + detected: + description: Timestamp when the incident was detected. + format: date-time + nullable: true + type: string + fields: + additionalProperties: + $ref: '#/components/schemas/IncidentFieldAttributes' + description: A condensed view of the user-defined fields attached to incidents. + example: + severity: + type: dropdown + value: SEV-5 + type: object + modified: + description: Timestamp when the incident was last modified. + format: date-time + readOnly: true + type: string + notification_handles: + description: Notification handles that will be notified of the incident + during update. + items: + description: A notification handle that will be notified during incident + update. + example: '@test.user@test.com' + type: string + type: array + postmortem_id: + description: The UUID of the postmortem object attached to the incident. + example: 00000000-0000-0000-0000-000000000000 + type: string + public_id: + description: The monotonically increasing integer ID for the incident. + example: 1 + format: int64 + type: integer + resolved: + description: Timestamp when the incident's state was set to resolved. + format: date-time + nullable: true + type: string + time_to_detect: + description: The amount of time in seconds to detect the incident. Equals + the difference between `customer_impact_start` and `detected`. + format: int64 + readOnly: true + type: integer + time_to_internal_response: + description: The amount of time in seconds to call incident after detection. + Equals the difference of `detected` and `created`. + format: int64 + readOnly: true + type: integer + time_to_repair: + description: The amount of time in seconds to resolve customer impact after + detecting the issue. Equals the difference between `customer_impact_end` + and `detected`. + format: int64 + readOnly: true + type: integer + time_to_resolve: + description: The amount of time in seconds to resolve the incident after + it was created. Equals the difference between `created` and `resolved`. + format: int64 + readOnly: true + type: integer + title: + description: The title of the incident, which summarizes what happened. + example: A test incident title + type: string + required: + - title + type: object + IncidentResponseData: + description: Incident data from a response. + example: + relationships: + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + attributes: + time_to_repair: 5 + created: 2000-01-23T04:56:07.000+00:00 + time_to_internal_response: 1 + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + customer_impact_duration: 0 + title: A test incident title + public_id: 1 + time_to_detect: 6 + customer_impact_scope: An example customer impact scope + postmortem_id: 00000000-0000-0000-0000-000000000000 + customer_impact_end: 2000-01-23T04:56:07.000+00:00 + time_to_resolve: 5 + customer_impact_start: 2000-01-23T04:56:07.000+00:00 + detected: 2000-01-23T04:56:07.000+00:00 + modified: 2000-01-23T04:56:07.000+00:00 + fields: + severity: + type: dropdown + value: SEV-5 + customer_impacted: false + resolved: 2000-01-23T04:56:07.000+00:00 + id: 00000000-0000-0000-0000-000000000000 + type: incidents + properties: + attributes: + $ref: '#/components/schemas/IncidentResponseAttributes' + id: + description: The incident's ID. + example: 00000000-0000-0000-0000-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentResponseRelationships' + type: + $ref: '#/components/schemas/IncidentType' + required: + - id + - type + type: object + IncidentResponseIncludedItem: + description: An object related to an incident that is included in the response. + oneOf: + - $ref: '#/components/schemas/User' + type: object + IncidentResponseRelationships: + description: The incident's relationships from a response. example: - dashboards: - - id: q5j-nti-fv6 - - id: q5j-nti-fv6 + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users properties: - dashboards: - description: List of dashboards in the dashboard list. - items: - $ref: '#/components/schemas/DashboardListItemResponse' - type: array + commander_user: + $ref: '#/components/schemas/RelationshipToUser' + created_by_user: + $ref: '#/components/schemas/RelationshipToUser' + integrations: + $ref: '#/components/schemas/RelationshipToIncidentIntegrationMetadatas' + last_modified_by_user: + $ref: '#/components/schemas/RelationshipToUser' + postmortem: + $ref: '#/components/schemas/RelationshipToIncidentPostmortem' type: object - DashboardType: - description: The type of the dashboard. - enum: - - custom_timeboard - - custom_screenboard - - integration_screenboard - - integration_timeboard - - host_timeboard - type: string - x-enum-varnames: - - CUSTOM_TIMEBOARD - - CUSTOM_SCREENBOARD - - INTEGRATION_SCREENBOARD - - INTEGRATION_TIMEBOARD - - HOST_TIMEBOARD IncidentServiceCreateAttributes: description: The incident service's attributes for a create request. example: @@ -3630,6 +4459,467 @@ components: required: - data type: object + IncidentTimelineCellCreateAttributes: + description: The timeline cell's attributes for a create request. + oneOf: + - $ref: '#/components/schemas/IncidentTimelineCellMarkdownCreateAttributes' + type: object + IncidentTimelineCellMarkdownContentType: + default: markdown + description: Type of the Markdown timeline cell. + enum: + - markdown + example: markdown + type: string + x-enum-varnames: + - MARKDOWN + IncidentTimelineCellMarkdownCreateAttributes: + description: Timeline cell data for Markdown timeline cells for a create request. + properties: + cell_type: + $ref: '#/components/schemas/IncidentTimelineCellMarkdownContentType' + content: + $ref: '#/components/schemas/IncidentTimelineCellMarkdownCreateAttributes_content' + important: + default: false + description: A flag indicating whether the timeline cell is important and + should be highlighted. + example: false + type: boolean + required: + - cell_type + - content + type: object + IncidentType: + default: incidents + description: Incident resource type. + enum: + - incidents + example: incidents + type: string + x-enum-varnames: + - INCIDENTS + IncidentUpdateAttributes: + description: The incident's attributes for an update request. + example: + customer_impact_scope: Example customer impact scope + customer_impact_end: 2000-01-23T04:56:07.000+00:00 + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + customer_impact_start: 2000-01-23T04:56:07.000+00:00 + detected: 2000-01-23T04:56:07.000+00:00 + fields: + severity: + type: dropdown + value: SEV-5 + title: A test incident title + customer_impacted: false + resolved: 2000-01-23T04:56:07.000+00:00 + properties: + customer_impact_end: + description: Timestamp when customers were no longer impacted by the incident. + format: date-time + nullable: true + type: string + customer_impact_scope: + description: A summary of the impact customers experienced during the incident. + example: Example customer impact scope + type: string + customer_impact_start: + description: Timestamp when customers began being impacted by the incident. + format: date-time + nullable: true + type: string + customer_impacted: + description: A flag indicating whether the incident caused customer impact. + example: false + type: boolean + detected: + description: Timestamp when the incident was detected. + format: date-time + nullable: true + type: string + fields: + additionalProperties: + $ref: '#/components/schemas/IncidentFieldAttributes' + description: A condensed view of the user-defined fields for which to update + selections. + example: + severity: + type: dropdown + value: SEV-5 + type: object + notification_handles: + description: Notification handles that will be notified of the incident + during update. + items: + description: A notification handle that will be notified during incident + update. + example: '@test.user@test.com' + type: string + type: array + resolved: + description: Timestamp when the incident's state was set to resolved. + format: date-time + nullable: true + type: string + title: + description: The title of the incident, which summarizes what happened. + example: A test incident title + type: string + type: object + IncidentUpdateData: + description: Incident data for an update request. + example: + relationships: + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + attributes: + customer_impact_scope: Example customer impact scope + customer_impact_end: 2000-01-23T04:56:07.000+00:00 + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + customer_impact_start: 2000-01-23T04:56:07.000+00:00 + detected: 2000-01-23T04:56:07.000+00:00 + fields: + severity: + type: dropdown + value: SEV-5 + title: A test incident title + customer_impacted: false + resolved: 2000-01-23T04:56:07.000+00:00 + id: 00000000-0000-0000-0000-000000000000 + type: incidents + properties: + attributes: + $ref: '#/components/schemas/IncidentUpdateAttributes' + id: + description: The team's ID. + example: 00000000-0000-0000-0000-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentUpdateRelationships' + type: + $ref: '#/components/schemas/IncidentType' + required: + - id + - type + type: object + IncidentUpdateRelationships: + description: The incident's relationships for an update request. + example: + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + properties: + commander_user: + $ref: '#/components/schemas/RelationshipToUser' + created_by_user: + $ref: '#/components/schemas/RelationshipToUser' + integrations: + $ref: '#/components/schemas/RelationshipToIncidentIntegrationMetadatas' + last_modified_by_user: + $ref: '#/components/schemas/RelationshipToUser' + postmortem: + $ref: '#/components/schemas/RelationshipToIncidentPostmortem' + type: object + IncidentUpdateRequest: + description: Update request for an incident. + example: + data: + relationships: + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + attributes: + customer_impact_scope: Example customer impact scope + customer_impact_end: 2000-01-23T04:56:07.000+00:00 + notification_handles: + - '@test.user@test.com' + - '@test.user@test.com' + customer_impact_start: 2000-01-23T04:56:07.000+00:00 + detected: 2000-01-23T04:56:07.000+00:00 + fields: + severity: + type: dropdown + value: SEV-5 + title: A test incident title + customer_impacted: false + resolved: 2000-01-23T04:56:07.000+00:00 + id: 00000000-0000-0000-0000-000000000000 + type: incidents + properties: + data: + $ref: '#/components/schemas/IncidentUpdateData' + required: + - data + type: object + IncidentsResponse: + description: Response with a list of incidents. + example: + data: + - attributes: + created: 2020-04-21T15:34:08.627205+00:00 + creation_idempotency_key: null + customer_impact_duration: 0 + customer_impact_end: null + customer_impact_scope: null + customer_impact_start: null + customer_impacted: false + detected: 2020-04-14T00:00:00+00:00 + modified: 2020-09-17T14:16:58.696424+00:00 + postmortem_id: 00000000-0000-0000-0000-000000000000 + public_id: 1 + resolved: null + severity: SEV-1 + time_to_detect: 0 + time_to_internal_response: 0 + time_to_repair: 0 + time_to_resolve: 0 + title: Example Incident + id: 00000000-0000-0000-0000-000000000000 + relationships: + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + type: incidents + - attributes: + created: 2020-04-21T15:34:08.627205+00:00 + creation_idempotency_key: null + customer_impact_duration: 0 + customer_impact_end: null + customer_impact_scope: null + customer_impact_start: null + customer_impacted: false + detected: 2020-04-14T00:00:00+00:00 + modified: 2020-09-17T14:16:58.696424+00:00 + postmortem_id: 00000000-0000-0000-0000-000000000000 + public_id: 2 + resolved: null + severity: SEV-5 + time_to_detect: 0 + time_to_internal_response: 0 + time_to_repair: 0 + time_to_resolve: 0 + title: Example Incident 2 + id: 00000000-0000-0000-0000-000000000000 + relationships: + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + type: incidents + meta: + pagination: + offset: 10 + size: 1000 + next_offset: 1000 + included: + - null + - null + properties: + data: + description: An array of incidents. + example: + - attributes: + created: 2020-04-21T15:34:08.627205+00:00 + creation_idempotency_key: null + customer_impact_duration: 0 + customer_impact_end: null + customer_impact_scope: null + customer_impact_start: null + customer_impacted: false + detected: 2020-04-14T00:00:00+00:00 + modified: 2020-09-17T14:16:58.696424+00:00 + postmortem_id: 00000000-0000-0000-0000-000000000000 + public_id: 1 + resolved: null + severity: SEV-1 + time_to_detect: 0 + time_to_internal_response: 0 + time_to_repair: 0 + time_to_resolve: 0 + title: Example Incident + id: 00000000-0000-0000-0000-000000000000 + relationships: + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + type: incidents + - attributes: + created: 2020-04-21T15:34:08.627205+00:00 + creation_idempotency_key: null + customer_impact_duration: 0 + customer_impact_end: null + customer_impact_scope: null + customer_impact_start: null + customer_impacted: false + detected: 2020-04-14T00:00:00+00:00 + modified: 2020-09-17T14:16:58.696424+00:00 + postmortem_id: 00000000-0000-0000-0000-000000000000 + public_id: 2 + resolved: null + severity: SEV-5 + time_to_detect: 0 + time_to_internal_response: 0 + time_to_repair: 0 + time_to_resolve: 0 + title: Example Incident 2 + id: 00000000-0000-0000-0000-000000000000 + relationships: + commander_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + last_modified_by_user: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + postmortem: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + type: incidents + items: + $ref: '#/components/schemas/IncidentResponseData' + type: array + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentResponseIncludedItem' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentServicesResponse_meta' + required: + - data + type: object Log: description: Object description of a log after being processed and stored by Datadog. @@ -4816,6 +6106,72 @@ components: x-enum-varnames: - ASC - DESC + RelationshipToIncidentIntegrationMetadataData: + description: A relationship reference for an integration metadata object. + example: + id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + properties: + id: + description: A unique identifier that represents the integration metadata. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentIntegrationMetadataType' + required: + - id + - type + type: object + RelationshipToIncidentIntegrationMetadatas: + description: A relationship reference for multiple integration metadata objects. + example: + data: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + properties: + data: + description: The integration metadata relationship array + example: + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + - id: 00000000-0000-0000-0000-000000000000 + type: incident_integration_metadata + items: + $ref: '#/components/schemas/RelationshipToIncidentIntegrationMetadataData' + type: array + required: + - data + type: object + RelationshipToIncidentPostmortem: + description: A relationship reference for postmortems. + example: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + properties: + data: + $ref: '#/components/schemas/RelationshipToIncidentPostmortemData' + required: + - data + type: object + RelationshipToIncidentPostmortemData: + description: The postmortem relationship data. + example: + id: 00000000-0000-0000-0000-000000000000 + type: incident_postmortems + properties: + id: + description: A unique identifier that represents the postmortem. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentPostmortemType' + required: + - id + - type + type: object RelationshipToOrganization: description: Relationship to an organization. example: @@ -6570,6 +7926,15 @@ components: $ref: '#/components/schemas/IncidentServicesResponse_meta_pagination' readOnly: true type: object + IncidentTimelineCellMarkdownCreateAttributes_content: + description: The Markdown timeline cell contents. + properties: + content: + description: The Markdown content of the cell. + example: An example timeline cell message. + nullable: false + type: string + type: object Log_attributes: description: JSON object containing all log attributes and their associated values. diff --git a/api/v2/datadog/api_incidents.go b/api/v2/datadog/api_incidents.go new file mode 100644 index 00000000000..7af864ca4a6 --- /dev/null +++ b/api/v2/datadog/api_incidents.go @@ -0,0 +1,974 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + _context "context" + _fmt "fmt" + _ioutil "io/ioutil" + _log "log" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +// IncidentsApiService IncidentsApi service +type IncidentsApiService service + +type ApiCreateIncidentRequest struct { + ctx _context.Context + ApiService *IncidentsApiService + body *IncidentCreateRequest +} + +func (r ApiCreateIncidentRequest) Body(body IncidentCreateRequest) ApiCreateIncidentRequest { + r.body = &body + return r +} + +func (r ApiCreateIncidentRequest) Execute() (IncidentResponse, *_nethttp.Response, error) { + return r.ApiService.CreateIncidentExecute(r) +} + +/* + * CreateIncident Create an incident + * Create an incident. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiCreateIncidentRequest + */ +func (a *IncidentsApiService) CreateIncident(ctx _context.Context) ApiCreateIncidentRequest { + return ApiCreateIncidentRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return IncidentResponse + */ +func (a *IncidentsApiService) CreateIncidentExecute(r ApiCreateIncidentRequest) (IncidentResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue IncidentResponse + ) + + operationId := "CreateIncident" + if r.ApiService.client.cfg.IsUnstableOperationEnabled(operationId) { + _log.Printf("WARNING: Using unstable operation '%s'", operationId) + } else { + return localVarReturnValue, nil, GenericOpenAPIError{error: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} + } + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IncidentsApiService.CreateIncident") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/incidents" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + + // Set Operation-ID header for telemetry + localVarHeaderParams["DD-OPERATION-ID"] = "CreateIncident" + + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-API-KEY"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["appKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-APPLICATION-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteIncidentRequest struct { + ctx _context.Context + ApiService *IncidentsApiService + incidentId string +} + +func (r ApiDeleteIncidentRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteIncidentExecute(r) +} + +/* + * DeleteIncident Delete an existing incident + * Deletes an existing incident from the users organization. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param incidentId The UUID the incident. + * @return ApiDeleteIncidentRequest + */ +func (a *IncidentsApiService) DeleteIncident(ctx _context.Context, incidentId string) ApiDeleteIncidentRequest { + return ApiDeleteIncidentRequest{ + ApiService: a, + ctx: ctx, + incidentId: incidentId, + } +} + +/* + * Execute executes the request + */ +func (a *IncidentsApiService) DeleteIncidentExecute(r ApiDeleteIncidentRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + operationId := "DeleteIncident" + if r.ApiService.client.cfg.IsUnstableOperationEnabled(operationId) { + _log.Printf("WARNING: Using unstable operation '%s'", operationId) + } else { + return nil, GenericOpenAPIError{error: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} + } + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IncidentsApiService.DeleteIncident") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/incidents/{incident_id}" + localVarPath = strings.Replace(localVarPath, "{"+"incident_id"+"}", _neturl.PathEscape(parameterToString(r.incidentId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + + // Set Operation-ID header for telemetry + localVarHeaderParams["DD-OPERATION-ID"] = "DeleteIncident" + + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-API-KEY"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["appKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-APPLICATION-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetIncidentRequest struct { + ctx _context.Context + ApiService *IncidentsApiService + incidentId string + include *[]string +} + +func (r ApiGetIncidentRequest) Include(include []string) ApiGetIncidentRequest { + r.include = &include + return r +} + +func (r ApiGetIncidentRequest) Execute() (IncidentResponse, *_nethttp.Response, error) { + return r.ApiService.GetIncidentExecute(r) +} + +/* + * GetIncident Get the details of an incident + * Get the details of an incident by `incident_id`. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param incidentId The UUID the incident. + * @return ApiGetIncidentRequest + */ +func (a *IncidentsApiService) GetIncident(ctx _context.Context, incidentId string) ApiGetIncidentRequest { + return ApiGetIncidentRequest{ + ApiService: a, + ctx: ctx, + incidentId: incidentId, + } +} + +/* + * Execute executes the request + * @return IncidentResponse + */ +func (a *IncidentsApiService) GetIncidentExecute(r ApiGetIncidentRequest) (IncidentResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue IncidentResponse + ) + + operationId := "GetIncident" + if r.ApiService.client.cfg.IsUnstableOperationEnabled(operationId) { + _log.Printf("WARNING: Using unstable operation '%s'", operationId) + } else { + return localVarReturnValue, nil, GenericOpenAPIError{error: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} + } + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IncidentsApiService.GetIncident") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/incidents/{incident_id}" + localVarPath = strings.Replace(localVarPath, "{"+"incident_id"+"}", _neturl.PathEscape(parameterToString(r.incidentId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.include != nil { + localVarQueryParams.Add("include", parameterToString(*r.include, "csv")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + + // Set Operation-ID header for telemetry + localVarHeaderParams["DD-OPERATION-ID"] = "GetIncident" + + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-API-KEY"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["appKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-APPLICATION-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListIncidentsRequest struct { + ctx _context.Context + ApiService *IncidentsApiService + include *[]string + pageSize *int64 + pageOffset *int64 +} + +func (r ApiListIncidentsRequest) Include(include []string) ApiListIncidentsRequest { + r.include = &include + return r +} +func (r ApiListIncidentsRequest) PageSize(pageSize int64) ApiListIncidentsRequest { + r.pageSize = &pageSize + return r +} +func (r ApiListIncidentsRequest) PageOffset(pageOffset int64) ApiListIncidentsRequest { + r.pageOffset = &pageOffset + return r +} + +func (r ApiListIncidentsRequest) Execute() (IncidentsResponse, *_nethttp.Response, error) { + return r.ApiService.ListIncidentsExecute(r) +} + +/* + * ListIncidents Get a list of incidents + * Get all incidents for the user's organization. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiListIncidentsRequest + */ +func (a *IncidentsApiService) ListIncidents(ctx _context.Context) ApiListIncidentsRequest { + return ApiListIncidentsRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return IncidentsResponse + */ +func (a *IncidentsApiService) ListIncidentsExecute(r ApiListIncidentsRequest) (IncidentsResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue IncidentsResponse + ) + + operationId := "ListIncidents" + if r.ApiService.client.cfg.IsUnstableOperationEnabled(operationId) { + _log.Printf("WARNING: Using unstable operation '%s'", operationId) + } else { + return localVarReturnValue, nil, GenericOpenAPIError{error: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} + } + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IncidentsApiService.ListIncidents") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/incidents" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.include != nil { + localVarQueryParams.Add("include", parameterToString(*r.include, "csv")) + } + if r.pageSize != nil { + localVarQueryParams.Add("page[size]", parameterToString(*r.pageSize, "")) + } + if r.pageOffset != nil { + localVarQueryParams.Add("page[offset]", parameterToString(*r.pageOffset, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + + // Set Operation-ID header for telemetry + localVarHeaderParams["DD-OPERATION-ID"] = "ListIncidents" + + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-API-KEY"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["appKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-APPLICATION-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateIncidentRequest struct { + ctx _context.Context + ApiService *IncidentsApiService + incidentId string + body *IncidentUpdateRequest +} + +func (r ApiUpdateIncidentRequest) Body(body IncidentUpdateRequest) ApiUpdateIncidentRequest { + r.body = &body + return r +} + +func (r ApiUpdateIncidentRequest) Execute() (IncidentResponse, *_nethttp.Response, error) { + return r.ApiService.UpdateIncidentExecute(r) +} + +/* + * UpdateIncident Update an existing incident + * Updates an incident. Provide only the attributes that should be updated as this request is a partial update. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param incidentId The UUID the incident. + * @return ApiUpdateIncidentRequest + */ +func (a *IncidentsApiService) UpdateIncident(ctx _context.Context, incidentId string) ApiUpdateIncidentRequest { + return ApiUpdateIncidentRequest{ + ApiService: a, + ctx: ctx, + incidentId: incidentId, + } +} + +/* + * Execute executes the request + * @return IncidentResponse + */ +func (a *IncidentsApiService) UpdateIncidentExecute(r ApiUpdateIncidentRequest) (IncidentResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue IncidentResponse + ) + + operationId := "UpdateIncident" + if r.ApiService.client.cfg.IsUnstableOperationEnabled(operationId) { + _log.Printf("WARNING: Using unstable operation '%s'", operationId) + } else { + return localVarReturnValue, nil, GenericOpenAPIError{error: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} + } + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IncidentsApiService.UpdateIncident") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/incidents/{incident_id}" + localVarPath = strings.Replace(localVarPath, "{"+"incident_id"+"}", _neturl.PathEscape(parameterToString(r.incidentId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + + // Set Operation-ID header for telemetry + localVarHeaderParams["DD-OPERATION-ID"] = "UpdateIncident" + + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-API-KEY"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["appKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["DD-APPLICATION-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v APIErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api/v2/datadog/client.go b/api/v2/datadog/client.go index a96e070d5c0..6907919cdbe 100644 --- a/api/v2/datadog/client.go +++ b/api/v2/datadog/client.go @@ -52,6 +52,8 @@ type APIClient struct { IncidentTeamsApi *IncidentTeamsApiService + IncidentsApi *IncidentsApiService + LogsApi *LogsApiService LogsArchivesApi *LogsArchivesApiService @@ -82,6 +84,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.DashboardListsApi = (*DashboardListsApiService)(&c.common) c.IncidentServicesApi = (*IncidentServicesApiService)(&c.common) c.IncidentTeamsApi = (*IncidentTeamsApiService)(&c.common) + c.IncidentsApi = (*IncidentsApiService)(&c.common) c.LogsApi = (*LogsApiService)(&c.common) c.LogsArchivesApi = (*LogsArchivesApiService)(&c.common) c.RolesApi = (*RolesApiService)(&c.common) diff --git a/api/v2/datadog/configuration.go b/api/v2/datadog/configuration.go index 8df584b4137..2d9a86c41bb 100644 --- a/api/v2/datadog/configuration.go +++ b/api/v2/datadog/configuration.go @@ -152,6 +152,11 @@ func NewConfiguration() *Configuration { "GetIncidentTeam": false, "ListIncidentTeams": false, "UpdateIncidentTeam": false, + "CreateIncident": false, + "DeleteIncident": false, + "GetIncident": false, + "ListIncidents": false, + "UpdateIncident": false, "ListLogs": false, "ListLogsGet": false, "AddReadRoleToArchive": false, diff --git a/api/v2/datadog/docs/IncidentCreateAttributes.md b/api/v2/datadog/docs/IncidentCreateAttributes.md new file mode 100644 index 00000000000..32c70e6a218 --- /dev/null +++ b/api/v2/datadog/docs/IncidentCreateAttributes.md @@ -0,0 +1,150 @@ +# IncidentCreateAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerImpacted** | **bool** | A flag indicating whether the incident caused customer impact. | +**Fields** | Pointer to [**map[string]IncidentFieldAttributes**](IncidentFieldAttributes.md) | A condensed view of the user-defined fields for which to create initial selections. | [optional] +**InitialTimelineCells** | Pointer to [**[]IncidentTimelineCellCreateAttributes**](IncidentTimelineCellCreateAttributes.md) | An array of initial timeline cells to be placed at the beginning of the incident timeline. | [optional] +**NotificationHandles** | Pointer to **[]string** | Notification handles that will be notified of the incident at creation. | [optional] +**Title** | **string** | The title of the incident, which summarizes what happened. | + +## Methods + +### NewIncidentCreateAttributes + +`func NewIncidentCreateAttributes(customerImpacted bool, title string, ) *IncidentCreateAttributes` + +NewIncidentCreateAttributes instantiates a new IncidentCreateAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentCreateAttributesWithDefaults + +`func NewIncidentCreateAttributesWithDefaults() *IncidentCreateAttributes` + +NewIncidentCreateAttributesWithDefaults instantiates a new IncidentCreateAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerImpacted + +`func (o *IncidentCreateAttributes) GetCustomerImpacted() bool` + +GetCustomerImpacted returns the CustomerImpacted field if non-nil, zero value otherwise. + +### GetCustomerImpactedOk + +`func (o *IncidentCreateAttributes) GetCustomerImpactedOk() (*bool, bool)` + +GetCustomerImpactedOk returns a tuple with the CustomerImpacted field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpacted + +`func (o *IncidentCreateAttributes) SetCustomerImpacted(v bool)` + +SetCustomerImpacted sets CustomerImpacted field to given value. + + +### GetFields + +`func (o *IncidentCreateAttributes) GetFields() map[string]IncidentFieldAttributes` + +GetFields returns the Fields field if non-nil, zero value otherwise. + +### GetFieldsOk + +`func (o *IncidentCreateAttributes) GetFieldsOk() (*map[string]IncidentFieldAttributes, bool)` + +GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFields + +`func (o *IncidentCreateAttributes) SetFields(v map[string]IncidentFieldAttributes)` + +SetFields sets Fields field to given value. + +### HasFields + +`func (o *IncidentCreateAttributes) HasFields() bool` + +HasFields returns a boolean if a field has been set. + +### GetInitialTimelineCells + +`func (o *IncidentCreateAttributes) GetInitialTimelineCells() []IncidentTimelineCellCreateAttributes` + +GetInitialTimelineCells returns the InitialTimelineCells field if non-nil, zero value otherwise. + +### GetInitialTimelineCellsOk + +`func (o *IncidentCreateAttributes) GetInitialTimelineCellsOk() (*[]IncidentTimelineCellCreateAttributes, bool)` + +GetInitialTimelineCellsOk returns a tuple with the InitialTimelineCells field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInitialTimelineCells + +`func (o *IncidentCreateAttributes) SetInitialTimelineCells(v []IncidentTimelineCellCreateAttributes)` + +SetInitialTimelineCells sets InitialTimelineCells field to given value. + +### HasInitialTimelineCells + +`func (o *IncidentCreateAttributes) HasInitialTimelineCells() bool` + +HasInitialTimelineCells returns a boolean if a field has been set. + +### GetNotificationHandles + +`func (o *IncidentCreateAttributes) GetNotificationHandles() []string` + +GetNotificationHandles returns the NotificationHandles field if non-nil, zero value otherwise. + +### GetNotificationHandlesOk + +`func (o *IncidentCreateAttributes) GetNotificationHandlesOk() (*[]string, bool)` + +GetNotificationHandlesOk returns a tuple with the NotificationHandles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotificationHandles + +`func (o *IncidentCreateAttributes) SetNotificationHandles(v []string)` + +SetNotificationHandles sets NotificationHandles field to given value. + +### HasNotificationHandles + +`func (o *IncidentCreateAttributes) HasNotificationHandles() bool` + +HasNotificationHandles returns a boolean if a field has been set. + +### GetTitle + +`func (o *IncidentCreateAttributes) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *IncidentCreateAttributes) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *IncidentCreateAttributes) SetTitle(v string)` + +SetTitle sets Title field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentCreateData.md b/api/v2/datadog/docs/IncidentCreateData.md new file mode 100644 index 00000000000..c5ad077b27a --- /dev/null +++ b/api/v2/datadog/docs/IncidentCreateData.md @@ -0,0 +1,98 @@ +# IncidentCreateData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [**IncidentCreateAttributes**](IncidentCreateAttributes.md) | | +**Relationships** | Pointer to [**IncidentCreateRelationships**](IncidentCreateRelationships.md) | | [optional] +**Type** | [**IncidentType**](IncidentType.md) | | [default to "incidents"] + +## Methods + +### NewIncidentCreateData + +`func NewIncidentCreateData(attributes IncidentCreateAttributes, type_ IncidentType, ) *IncidentCreateData` + +NewIncidentCreateData instantiates a new IncidentCreateData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentCreateDataWithDefaults + +`func NewIncidentCreateDataWithDefaults() *IncidentCreateData` + +NewIncidentCreateDataWithDefaults instantiates a new IncidentCreateData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttributes + +`func (o *IncidentCreateData) GetAttributes() IncidentCreateAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *IncidentCreateData) GetAttributesOk() (*IncidentCreateAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *IncidentCreateData) SetAttributes(v IncidentCreateAttributes)` + +SetAttributes sets Attributes field to given value. + + +### GetRelationships + +`func (o *IncidentCreateData) GetRelationships() IncidentCreateRelationships` + +GetRelationships returns the Relationships field if non-nil, zero value otherwise. + +### GetRelationshipsOk + +`func (o *IncidentCreateData) GetRelationshipsOk() (*IncidentCreateRelationships, bool)` + +GetRelationshipsOk returns a tuple with the Relationships field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelationships + +`func (o *IncidentCreateData) SetRelationships(v IncidentCreateRelationships)` + +SetRelationships sets Relationships field to given value. + +### HasRelationships + +`func (o *IncidentCreateData) HasRelationships() bool` + +HasRelationships returns a boolean if a field has been set. + +### GetType + +`func (o *IncidentCreateData) GetType() IncidentType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IncidentCreateData) GetTypeOk() (*IncidentType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IncidentCreateData) SetType(v IncidentType)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentCreateRelationships.md b/api/v2/datadog/docs/IncidentCreateRelationships.md new file mode 100644 index 00000000000..530f910a864 --- /dev/null +++ b/api/v2/datadog/docs/IncidentCreateRelationships.md @@ -0,0 +1,51 @@ +# IncidentCreateRelationships + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Commander** | [**RelationshipToUser**](RelationshipToUser.md) | | + +## Methods + +### NewIncidentCreateRelationships + +`func NewIncidentCreateRelationships(commander RelationshipToUser, ) *IncidentCreateRelationships` + +NewIncidentCreateRelationships instantiates a new IncidentCreateRelationships object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentCreateRelationshipsWithDefaults + +`func NewIncidentCreateRelationshipsWithDefaults() *IncidentCreateRelationships` + +NewIncidentCreateRelationshipsWithDefaults instantiates a new IncidentCreateRelationships object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCommander + +`func (o *IncidentCreateRelationships) GetCommander() RelationshipToUser` + +GetCommander returns the Commander field if non-nil, zero value otherwise. + +### GetCommanderOk + +`func (o *IncidentCreateRelationships) GetCommanderOk() (*RelationshipToUser, bool)` + +GetCommanderOk returns a tuple with the Commander field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommander + +`func (o *IncidentCreateRelationships) SetCommander(v RelationshipToUser)` + +SetCommander sets Commander field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentCreateRequest.md b/api/v2/datadog/docs/IncidentCreateRequest.md new file mode 100644 index 00000000000..cef76d8965b --- /dev/null +++ b/api/v2/datadog/docs/IncidentCreateRequest.md @@ -0,0 +1,51 @@ +# IncidentCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**IncidentCreateData**](IncidentCreateData.md) | | + +## Methods + +### NewIncidentCreateRequest + +`func NewIncidentCreateRequest(data IncidentCreateData, ) *IncidentCreateRequest` + +NewIncidentCreateRequest instantiates a new IncidentCreateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentCreateRequestWithDefaults + +`func NewIncidentCreateRequestWithDefaults() *IncidentCreateRequest` + +NewIncidentCreateRequestWithDefaults instantiates a new IncidentCreateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *IncidentCreateRequest) GetData() IncidentCreateData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *IncidentCreateRequest) GetDataOk() (*IncidentCreateData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *IncidentCreateRequest) SetData(v IncidentCreateData)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentFieldAttributes.md b/api/v2/datadog/docs/IncidentFieldAttributes.md new file mode 100644 index 00000000000..4e38d37b1c4 --- /dev/null +++ b/api/v2/datadog/docs/IncidentFieldAttributes.md @@ -0,0 +1,77 @@ +# IncidentFieldAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**IncidentFieldAttributesValueType**](IncidentFieldAttributesValueType.md) | | [default to "multiselect"] +**Value** | Pointer to **[]string** | The multiple values selected for this field. | [optional] + +## Methods + +### NewIncidentFieldAttributes + +`func NewIncidentFieldAttributes(type_ IncidentFieldAttributesValueType, ) *IncidentFieldAttributes` + +NewIncidentFieldAttributes instantiates a new IncidentFieldAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentFieldAttributesWithDefaults + +`func NewIncidentFieldAttributesWithDefaults() *IncidentFieldAttributes` + +NewIncidentFieldAttributesWithDefaults instantiates a new IncidentFieldAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *IncidentFieldAttributes) GetType() IncidentFieldAttributesValueType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IncidentFieldAttributes) GetTypeOk() (*IncidentFieldAttributesValueType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IncidentFieldAttributes) SetType(v IncidentFieldAttributesValueType)` + +SetType sets Type field to given value. + + +### GetValue + +`func (o *IncidentFieldAttributes) GetValue() []string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IncidentFieldAttributes) GetValueOk() (*[]string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IncidentFieldAttributes) SetValue(v []string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *IncidentFieldAttributes) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentFieldAttributesMultipleValue.md b/api/v2/datadog/docs/IncidentFieldAttributesMultipleValue.md new file mode 100644 index 00000000000..6988ab0505a --- /dev/null +++ b/api/v2/datadog/docs/IncidentFieldAttributesMultipleValue.md @@ -0,0 +1,82 @@ +# IncidentFieldAttributesMultipleValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to [**IncidentFieldAttributesValueType**](IncidentFieldAttributesValueType.md) | | [optional] [default to "multiselect"] +**Value** | Pointer to **[]string** | The multiple values selected for this field. | [optional] + +## Methods + +### NewIncidentFieldAttributesMultipleValue + +`func NewIncidentFieldAttributesMultipleValue() *IncidentFieldAttributesMultipleValue` + +NewIncidentFieldAttributesMultipleValue instantiates a new IncidentFieldAttributesMultipleValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentFieldAttributesMultipleValueWithDefaults + +`func NewIncidentFieldAttributesMultipleValueWithDefaults() *IncidentFieldAttributesMultipleValue` + +NewIncidentFieldAttributesMultipleValueWithDefaults instantiates a new IncidentFieldAttributesMultipleValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *IncidentFieldAttributesMultipleValue) GetType() IncidentFieldAttributesValueType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IncidentFieldAttributesMultipleValue) GetTypeOk() (*IncidentFieldAttributesValueType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IncidentFieldAttributesMultipleValue) SetType(v IncidentFieldAttributesValueType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IncidentFieldAttributesMultipleValue) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetValue + +`func (o *IncidentFieldAttributesMultipleValue) GetValue() []string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IncidentFieldAttributesMultipleValue) GetValueOk() (*[]string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IncidentFieldAttributesMultipleValue) SetValue(v []string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *IncidentFieldAttributesMultipleValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentFieldAttributesSingleValue.md b/api/v2/datadog/docs/IncidentFieldAttributesSingleValue.md new file mode 100644 index 00000000000..46c9090ad70 --- /dev/null +++ b/api/v2/datadog/docs/IncidentFieldAttributesSingleValue.md @@ -0,0 +1,82 @@ +# IncidentFieldAttributesSingleValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to [**IncidentFieldAttributesSingleValueType**](IncidentFieldAttributesSingleValueType.md) | | [optional] [default to "dropdown"] +**Value** | Pointer to **string** | The single value selected for this field. | [optional] + +## Methods + +### NewIncidentFieldAttributesSingleValue + +`func NewIncidentFieldAttributesSingleValue() *IncidentFieldAttributesSingleValue` + +NewIncidentFieldAttributesSingleValue instantiates a new IncidentFieldAttributesSingleValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentFieldAttributesSingleValueWithDefaults + +`func NewIncidentFieldAttributesSingleValueWithDefaults() *IncidentFieldAttributesSingleValue` + +NewIncidentFieldAttributesSingleValueWithDefaults instantiates a new IncidentFieldAttributesSingleValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *IncidentFieldAttributesSingleValue) GetType() IncidentFieldAttributesSingleValueType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IncidentFieldAttributesSingleValue) GetTypeOk() (*IncidentFieldAttributesSingleValueType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IncidentFieldAttributesSingleValue) SetType(v IncidentFieldAttributesSingleValueType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IncidentFieldAttributesSingleValue) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetValue + +`func (o *IncidentFieldAttributesSingleValue) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IncidentFieldAttributesSingleValue) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *IncidentFieldAttributesSingleValue) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *IncidentFieldAttributesSingleValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentFieldAttributesSingleValueType.md b/api/v2/datadog/docs/IncidentFieldAttributesSingleValueType.md new file mode 100644 index 00000000000..8bb21d70f1f --- /dev/null +++ b/api/v2/datadog/docs/IncidentFieldAttributesSingleValueType.md @@ -0,0 +1,13 @@ +# IncidentFieldAttributesSingleValueType + +## Enum + + +* `DROPDOWN` (value: `"dropdown"`) + +* `TEXTBOX` (value: `"textbox"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentFieldAttributesValueType.md b/api/v2/datadog/docs/IncidentFieldAttributesValueType.md new file mode 100644 index 00000000000..786a23c8cda --- /dev/null +++ b/api/v2/datadog/docs/IncidentFieldAttributesValueType.md @@ -0,0 +1,17 @@ +# IncidentFieldAttributesValueType + +## Enum + + +* `MULTISELECT` (value: `"multiselect"`) + +* `TEXTARRAY` (value: `"textarray"`) + +* `METRICTAG` (value: `"metrictag"`) + +* `AUTOCOMPLETE` (value: `"autocomplete"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentIntegrationMetadataType.md b/api/v2/datadog/docs/IncidentIntegrationMetadataType.md new file mode 100644 index 00000000000..481e63f554d --- /dev/null +++ b/api/v2/datadog/docs/IncidentIntegrationMetadataType.md @@ -0,0 +1,11 @@ +# IncidentIntegrationMetadataType + +## Enum + + +* `INCIDENT_INTEGRATION_METADATA` (value: `"incident_integration_metadata"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentPostmortemType.md b/api/v2/datadog/docs/IncidentPostmortemType.md new file mode 100644 index 00000000000..e5930a13c77 --- /dev/null +++ b/api/v2/datadog/docs/IncidentPostmortemType.md @@ -0,0 +1,11 @@ +# IncidentPostmortemType + +## Enum + + +* `INCIDENT_POSTMORTEMS` (value: `"incident_postmortems"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentResponse.md b/api/v2/datadog/docs/IncidentResponse.md new file mode 100644 index 00000000000..62360b73235 --- /dev/null +++ b/api/v2/datadog/docs/IncidentResponse.md @@ -0,0 +1,77 @@ +# IncidentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**IncidentResponseData**](IncidentResponseData.md) | | +**Included** | Pointer to [**[]IncidentResponseIncludedItem**](IncidentResponseIncludedItem.md) | Included related resources that the user requested. | [optional] [readonly] + +## Methods + +### NewIncidentResponse + +`func NewIncidentResponse(data IncidentResponseData, ) *IncidentResponse` + +NewIncidentResponse instantiates a new IncidentResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentResponseWithDefaults + +`func NewIncidentResponseWithDefaults() *IncidentResponse` + +NewIncidentResponseWithDefaults instantiates a new IncidentResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *IncidentResponse) GetData() IncidentResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *IncidentResponse) GetDataOk() (*IncidentResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *IncidentResponse) SetData(v IncidentResponseData)` + +SetData sets Data field to given value. + + +### GetIncluded + +`func (o *IncidentResponse) GetIncluded() []IncidentResponseIncludedItem` + +GetIncluded returns the Included field if non-nil, zero value otherwise. + +### GetIncludedOk + +`func (o *IncidentResponse) GetIncludedOk() (*[]IncidentResponseIncludedItem, bool)` + +GetIncludedOk returns a tuple with the Included field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncluded + +`func (o *IncidentResponse) SetIncluded(v []IncidentResponseIncludedItem)` + +SetIncluded sets Included field to given value. + +### HasIncluded + +`func (o *IncidentResponse) HasIncluded() bool` + +HasIncluded returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentResponseAttributes.md b/api/v2/datadog/docs/IncidentResponseAttributes.md new file mode 100644 index 00000000000..f13c0041988 --- /dev/null +++ b/api/v2/datadog/docs/IncidentResponseAttributes.md @@ -0,0 +1,543 @@ +# IncidentResponseAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the incident was created. | [optional] [readonly] +**CustomerImpactDuration** | Pointer to **int64** | Length of the incident's customer impact in seconds. Equals the difference between `customer_impact_start` and `customer_impact_end`. | [optional] [readonly] +**CustomerImpactEnd** | Pointer to [**NullableTime**](time.Time.md) | Timestamp when customers were no longer impacted by the incident. | [optional] +**CustomerImpactScope** | Pointer to **NullableString** | A summary of the impact customers experienced during the incident. | [optional] +**CustomerImpactStart** | Pointer to [**NullableTime**](time.Time.md) | Timestamp when customers began being impacted by the incident. | [optional] +**CustomerImpacted** | Pointer to **bool** | A flag indicating whether the incident caused customer impact. | [optional] +**Detected** | Pointer to [**NullableTime**](time.Time.md) | Timestamp when the incident was detected. | [optional] +**Fields** | Pointer to [**map[string]IncidentFieldAttributes**](IncidentFieldAttributes.md) | A condensed view of the user-defined fields attached to incidents. | [optional] +**Modified** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the incident was last modified. | [optional] [readonly] +**NotificationHandles** | Pointer to **[]string** | Notification handles that will be notified of the incident during update. | [optional] +**PostmortemId** | Pointer to **string** | The UUID of the postmortem object attached to the incident. | [optional] +**PublicId** | Pointer to **int64** | The monotonically increasing integer ID for the incident. | [optional] +**Resolved** | Pointer to [**NullableTime**](time.Time.md) | Timestamp when the incident's state was set to resolved. | [optional] +**TimeToDetect** | Pointer to **int64** | The amount of time in seconds to detect the incident. Equals the difference between `customer_impact_start` and `detected`. | [optional] [readonly] +**TimeToInternalResponse** | Pointer to **int64** | The amount of time in seconds to call incident after detection. Equals the difference of `detected` and `created`. | [optional] [readonly] +**TimeToRepair** | Pointer to **int64** | The amount of time in seconds to resolve customer impact after detecting the issue. Equals the difference between `customer_impact_end` and `detected`. | [optional] [readonly] +**TimeToResolve** | Pointer to **int64** | The amount of time in seconds to resolve the incident after it was created. Equals the difference between `created` and `resolved`. | [optional] [readonly] +**Title** | **string** | The title of the incident, which summarizes what happened. | + +## Methods + +### NewIncidentResponseAttributes + +`func NewIncidentResponseAttributes(title string, ) *IncidentResponseAttributes` + +NewIncidentResponseAttributes instantiates a new IncidentResponseAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentResponseAttributesWithDefaults + +`func NewIncidentResponseAttributesWithDefaults() *IncidentResponseAttributes` + +NewIncidentResponseAttributesWithDefaults instantiates a new IncidentResponseAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreated + +`func (o *IncidentResponseAttributes) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IncidentResponseAttributes) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IncidentResponseAttributes) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IncidentResponseAttributes) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetCustomerImpactDuration + +`func (o *IncidentResponseAttributes) GetCustomerImpactDuration() int64` + +GetCustomerImpactDuration returns the CustomerImpactDuration field if non-nil, zero value otherwise. + +### GetCustomerImpactDurationOk + +`func (o *IncidentResponseAttributes) GetCustomerImpactDurationOk() (*int64, bool)` + +GetCustomerImpactDurationOk returns a tuple with the CustomerImpactDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpactDuration + +`func (o *IncidentResponseAttributes) SetCustomerImpactDuration(v int64)` + +SetCustomerImpactDuration sets CustomerImpactDuration field to given value. + +### HasCustomerImpactDuration + +`func (o *IncidentResponseAttributes) HasCustomerImpactDuration() bool` + +HasCustomerImpactDuration returns a boolean if a field has been set. + +### GetCustomerImpactEnd + +`func (o *IncidentResponseAttributes) GetCustomerImpactEnd() time.Time` + +GetCustomerImpactEnd returns the CustomerImpactEnd field if non-nil, zero value otherwise. + +### GetCustomerImpactEndOk + +`func (o *IncidentResponseAttributes) GetCustomerImpactEndOk() (*time.Time, bool)` + +GetCustomerImpactEndOk returns a tuple with the CustomerImpactEnd field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpactEnd + +`func (o *IncidentResponseAttributes) SetCustomerImpactEnd(v time.Time)` + +SetCustomerImpactEnd sets CustomerImpactEnd field to given value. + +### HasCustomerImpactEnd + +`func (o *IncidentResponseAttributes) HasCustomerImpactEnd() bool` + +HasCustomerImpactEnd returns a boolean if a field has been set. + +### SetCustomerImpactEndNil + +`func (o *IncidentResponseAttributes) SetCustomerImpactEndNil(b bool)` + + SetCustomerImpactEndNil sets the value for CustomerImpactEnd to be an explicit nil + +### UnsetCustomerImpactEnd +`func (o *IncidentResponseAttributes) UnsetCustomerImpactEnd()` + +UnsetCustomerImpactEnd ensures that no value is present for CustomerImpactEnd, not even an explicit nil +### GetCustomerImpactScope + +`func (o *IncidentResponseAttributes) GetCustomerImpactScope() string` + +GetCustomerImpactScope returns the CustomerImpactScope field if non-nil, zero value otherwise. + +### GetCustomerImpactScopeOk + +`func (o *IncidentResponseAttributes) GetCustomerImpactScopeOk() (*string, bool)` + +GetCustomerImpactScopeOk returns a tuple with the CustomerImpactScope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpactScope + +`func (o *IncidentResponseAttributes) SetCustomerImpactScope(v string)` + +SetCustomerImpactScope sets CustomerImpactScope field to given value. + +### HasCustomerImpactScope + +`func (o *IncidentResponseAttributes) HasCustomerImpactScope() bool` + +HasCustomerImpactScope returns a boolean if a field has been set. + +### SetCustomerImpactScopeNil + +`func (o *IncidentResponseAttributes) SetCustomerImpactScopeNil(b bool)` + + SetCustomerImpactScopeNil sets the value for CustomerImpactScope to be an explicit nil + +### UnsetCustomerImpactScope +`func (o *IncidentResponseAttributes) UnsetCustomerImpactScope()` + +UnsetCustomerImpactScope ensures that no value is present for CustomerImpactScope, not even an explicit nil +### GetCustomerImpactStart + +`func (o *IncidentResponseAttributes) GetCustomerImpactStart() time.Time` + +GetCustomerImpactStart returns the CustomerImpactStart field if non-nil, zero value otherwise. + +### GetCustomerImpactStartOk + +`func (o *IncidentResponseAttributes) GetCustomerImpactStartOk() (*time.Time, bool)` + +GetCustomerImpactStartOk returns a tuple with the CustomerImpactStart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpactStart + +`func (o *IncidentResponseAttributes) SetCustomerImpactStart(v time.Time)` + +SetCustomerImpactStart sets CustomerImpactStart field to given value. + +### HasCustomerImpactStart + +`func (o *IncidentResponseAttributes) HasCustomerImpactStart() bool` + +HasCustomerImpactStart returns a boolean if a field has been set. + +### SetCustomerImpactStartNil + +`func (o *IncidentResponseAttributes) SetCustomerImpactStartNil(b bool)` + + SetCustomerImpactStartNil sets the value for CustomerImpactStart to be an explicit nil + +### UnsetCustomerImpactStart +`func (o *IncidentResponseAttributes) UnsetCustomerImpactStart()` + +UnsetCustomerImpactStart ensures that no value is present for CustomerImpactStart, not even an explicit nil +### GetCustomerImpacted + +`func (o *IncidentResponseAttributes) GetCustomerImpacted() bool` + +GetCustomerImpacted returns the CustomerImpacted field if non-nil, zero value otherwise. + +### GetCustomerImpactedOk + +`func (o *IncidentResponseAttributes) GetCustomerImpactedOk() (*bool, bool)` + +GetCustomerImpactedOk returns a tuple with the CustomerImpacted field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpacted + +`func (o *IncidentResponseAttributes) SetCustomerImpacted(v bool)` + +SetCustomerImpacted sets CustomerImpacted field to given value. + +### HasCustomerImpacted + +`func (o *IncidentResponseAttributes) HasCustomerImpacted() bool` + +HasCustomerImpacted returns a boolean if a field has been set. + +### GetDetected + +`func (o *IncidentResponseAttributes) GetDetected() time.Time` + +GetDetected returns the Detected field if non-nil, zero value otherwise. + +### GetDetectedOk + +`func (o *IncidentResponseAttributes) GetDetectedOk() (*time.Time, bool)` + +GetDetectedOk returns a tuple with the Detected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetected + +`func (o *IncidentResponseAttributes) SetDetected(v time.Time)` + +SetDetected sets Detected field to given value. + +### HasDetected + +`func (o *IncidentResponseAttributes) HasDetected() bool` + +HasDetected returns a boolean if a field has been set. + +### SetDetectedNil + +`func (o *IncidentResponseAttributes) SetDetectedNil(b bool)` + + SetDetectedNil sets the value for Detected to be an explicit nil + +### UnsetDetected +`func (o *IncidentResponseAttributes) UnsetDetected()` + +UnsetDetected ensures that no value is present for Detected, not even an explicit nil +### GetFields + +`func (o *IncidentResponseAttributes) GetFields() map[string]IncidentFieldAttributes` + +GetFields returns the Fields field if non-nil, zero value otherwise. + +### GetFieldsOk + +`func (o *IncidentResponseAttributes) GetFieldsOk() (*map[string]IncidentFieldAttributes, bool)` + +GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFields + +`func (o *IncidentResponseAttributes) SetFields(v map[string]IncidentFieldAttributes)` + +SetFields sets Fields field to given value. + +### HasFields + +`func (o *IncidentResponseAttributes) HasFields() bool` + +HasFields returns a boolean if a field has been set. + +### GetModified + +`func (o *IncidentResponseAttributes) GetModified() time.Time` + +GetModified returns the Modified field if non-nil, zero value otherwise. + +### GetModifiedOk + +`func (o *IncidentResponseAttributes) GetModifiedOk() (*time.Time, bool)` + +GetModifiedOk returns a tuple with the Modified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModified + +`func (o *IncidentResponseAttributes) SetModified(v time.Time)` + +SetModified sets Modified field to given value. + +### HasModified + +`func (o *IncidentResponseAttributes) HasModified() bool` + +HasModified returns a boolean if a field has been set. + +### GetNotificationHandles + +`func (o *IncidentResponseAttributes) GetNotificationHandles() []string` + +GetNotificationHandles returns the NotificationHandles field if non-nil, zero value otherwise. + +### GetNotificationHandlesOk + +`func (o *IncidentResponseAttributes) GetNotificationHandlesOk() (*[]string, bool)` + +GetNotificationHandlesOk returns a tuple with the NotificationHandles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotificationHandles + +`func (o *IncidentResponseAttributes) SetNotificationHandles(v []string)` + +SetNotificationHandles sets NotificationHandles field to given value. + +### HasNotificationHandles + +`func (o *IncidentResponseAttributes) HasNotificationHandles() bool` + +HasNotificationHandles returns a boolean if a field has been set. + +### GetPostmortemId + +`func (o *IncidentResponseAttributes) GetPostmortemId() string` + +GetPostmortemId returns the PostmortemId field if non-nil, zero value otherwise. + +### GetPostmortemIdOk + +`func (o *IncidentResponseAttributes) GetPostmortemIdOk() (*string, bool)` + +GetPostmortemIdOk returns a tuple with the PostmortemId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostmortemId + +`func (o *IncidentResponseAttributes) SetPostmortemId(v string)` + +SetPostmortemId sets PostmortemId field to given value. + +### HasPostmortemId + +`func (o *IncidentResponseAttributes) HasPostmortemId() bool` + +HasPostmortemId returns a boolean if a field has been set. + +### GetPublicId + +`func (o *IncidentResponseAttributes) GetPublicId() int64` + +GetPublicId returns the PublicId field if non-nil, zero value otherwise. + +### GetPublicIdOk + +`func (o *IncidentResponseAttributes) GetPublicIdOk() (*int64, bool)` + +GetPublicIdOk returns a tuple with the PublicId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublicId + +`func (o *IncidentResponseAttributes) SetPublicId(v int64)` + +SetPublicId sets PublicId field to given value. + +### HasPublicId + +`func (o *IncidentResponseAttributes) HasPublicId() bool` + +HasPublicId returns a boolean if a field has been set. + +### GetResolved + +`func (o *IncidentResponseAttributes) GetResolved() time.Time` + +GetResolved returns the Resolved field if non-nil, zero value otherwise. + +### GetResolvedOk + +`func (o *IncidentResponseAttributes) GetResolvedOk() (*time.Time, bool)` + +GetResolvedOk returns a tuple with the Resolved field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResolved + +`func (o *IncidentResponseAttributes) SetResolved(v time.Time)` + +SetResolved sets Resolved field to given value. + +### HasResolved + +`func (o *IncidentResponseAttributes) HasResolved() bool` + +HasResolved returns a boolean if a field has been set. + +### SetResolvedNil + +`func (o *IncidentResponseAttributes) SetResolvedNil(b bool)` + + SetResolvedNil sets the value for Resolved to be an explicit nil + +### UnsetResolved +`func (o *IncidentResponseAttributes) UnsetResolved()` + +UnsetResolved ensures that no value is present for Resolved, not even an explicit nil +### GetTimeToDetect + +`func (o *IncidentResponseAttributes) GetTimeToDetect() int64` + +GetTimeToDetect returns the TimeToDetect field if non-nil, zero value otherwise. + +### GetTimeToDetectOk + +`func (o *IncidentResponseAttributes) GetTimeToDetectOk() (*int64, bool)` + +GetTimeToDetectOk returns a tuple with the TimeToDetect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeToDetect + +`func (o *IncidentResponseAttributes) SetTimeToDetect(v int64)` + +SetTimeToDetect sets TimeToDetect field to given value. + +### HasTimeToDetect + +`func (o *IncidentResponseAttributes) HasTimeToDetect() bool` + +HasTimeToDetect returns a boolean if a field has been set. + +### GetTimeToInternalResponse + +`func (o *IncidentResponseAttributes) GetTimeToInternalResponse() int64` + +GetTimeToInternalResponse returns the TimeToInternalResponse field if non-nil, zero value otherwise. + +### GetTimeToInternalResponseOk + +`func (o *IncidentResponseAttributes) GetTimeToInternalResponseOk() (*int64, bool)` + +GetTimeToInternalResponseOk returns a tuple with the TimeToInternalResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeToInternalResponse + +`func (o *IncidentResponseAttributes) SetTimeToInternalResponse(v int64)` + +SetTimeToInternalResponse sets TimeToInternalResponse field to given value. + +### HasTimeToInternalResponse + +`func (o *IncidentResponseAttributes) HasTimeToInternalResponse() bool` + +HasTimeToInternalResponse returns a boolean if a field has been set. + +### GetTimeToRepair + +`func (o *IncidentResponseAttributes) GetTimeToRepair() int64` + +GetTimeToRepair returns the TimeToRepair field if non-nil, zero value otherwise. + +### GetTimeToRepairOk + +`func (o *IncidentResponseAttributes) GetTimeToRepairOk() (*int64, bool)` + +GetTimeToRepairOk returns a tuple with the TimeToRepair field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeToRepair + +`func (o *IncidentResponseAttributes) SetTimeToRepair(v int64)` + +SetTimeToRepair sets TimeToRepair field to given value. + +### HasTimeToRepair + +`func (o *IncidentResponseAttributes) HasTimeToRepair() bool` + +HasTimeToRepair returns a boolean if a field has been set. + +### GetTimeToResolve + +`func (o *IncidentResponseAttributes) GetTimeToResolve() int64` + +GetTimeToResolve returns the TimeToResolve field if non-nil, zero value otherwise. + +### GetTimeToResolveOk + +`func (o *IncidentResponseAttributes) GetTimeToResolveOk() (*int64, bool)` + +GetTimeToResolveOk returns a tuple with the TimeToResolve field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeToResolve + +`func (o *IncidentResponseAttributes) SetTimeToResolve(v int64)` + +SetTimeToResolve sets TimeToResolve field to given value. + +### HasTimeToResolve + +`func (o *IncidentResponseAttributes) HasTimeToResolve() bool` + +HasTimeToResolve returns a boolean if a field has been set. + +### GetTitle + +`func (o *IncidentResponseAttributes) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *IncidentResponseAttributes) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *IncidentResponseAttributes) SetTitle(v string)` + +SetTitle sets Title field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentResponseData.md b/api/v2/datadog/docs/IncidentResponseData.md new file mode 100644 index 00000000000..7465ad72766 --- /dev/null +++ b/api/v2/datadog/docs/IncidentResponseData.md @@ -0,0 +1,124 @@ +# IncidentResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | Pointer to [**IncidentResponseAttributes**](IncidentResponseAttributes.md) | | [optional] +**Id** | **string** | The incident's ID. | +**Relationships** | Pointer to [**IncidentResponseRelationships**](IncidentResponseRelationships.md) | | [optional] +**Type** | [**IncidentType**](IncidentType.md) | | [default to "incidents"] + +## Methods + +### NewIncidentResponseData + +`func NewIncidentResponseData(id string, type_ IncidentType, ) *IncidentResponseData` + +NewIncidentResponseData instantiates a new IncidentResponseData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentResponseDataWithDefaults + +`func NewIncidentResponseDataWithDefaults() *IncidentResponseData` + +NewIncidentResponseDataWithDefaults instantiates a new IncidentResponseData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttributes + +`func (o *IncidentResponseData) GetAttributes() IncidentResponseAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *IncidentResponseData) GetAttributesOk() (*IncidentResponseAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *IncidentResponseData) SetAttributes(v IncidentResponseAttributes)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *IncidentResponseData) HasAttributes() bool` + +HasAttributes returns a boolean if a field has been set. + +### GetId + +`func (o *IncidentResponseData) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IncidentResponseData) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IncidentResponseData) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRelationships + +`func (o *IncidentResponseData) GetRelationships() IncidentResponseRelationships` + +GetRelationships returns the Relationships field if non-nil, zero value otherwise. + +### GetRelationshipsOk + +`func (o *IncidentResponseData) GetRelationshipsOk() (*IncidentResponseRelationships, bool)` + +GetRelationshipsOk returns a tuple with the Relationships field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelationships + +`func (o *IncidentResponseData) SetRelationships(v IncidentResponseRelationships)` + +SetRelationships sets Relationships field to given value. + +### HasRelationships + +`func (o *IncidentResponseData) HasRelationships() bool` + +HasRelationships returns a boolean if a field has been set. + +### GetType + +`func (o *IncidentResponseData) GetType() IncidentType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IncidentResponseData) GetTypeOk() (*IncidentType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IncidentResponseData) SetType(v IncidentType)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentResponseIncludedItem.md b/api/v2/datadog/docs/IncidentResponseIncludedItem.md new file mode 100644 index 00000000000..a6b0fd1224f --- /dev/null +++ b/api/v2/datadog/docs/IncidentResponseIncludedItem.md @@ -0,0 +1,30 @@ +# IncidentResponseIncludedItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewIncidentResponseIncludedItem + +`func NewIncidentResponseIncludedItem() *IncidentResponseIncludedItem` + +NewIncidentResponseIncludedItem instantiates a new IncidentResponseIncludedItem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentResponseIncludedItemWithDefaults + +`func NewIncidentResponseIncludedItemWithDefaults() *IncidentResponseIncludedItem` + +NewIncidentResponseIncludedItemWithDefaults instantiates a new IncidentResponseIncludedItem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentResponseRelationships.md b/api/v2/datadog/docs/IncidentResponseRelationships.md new file mode 100644 index 00000000000..81d3df62242 --- /dev/null +++ b/api/v2/datadog/docs/IncidentResponseRelationships.md @@ -0,0 +1,160 @@ +# IncidentResponseRelationships + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CommanderUser** | Pointer to [**RelationshipToUser**](RelationshipToUser.md) | | [optional] +**CreatedByUser** | Pointer to [**RelationshipToUser**](RelationshipToUser.md) | | [optional] +**Integrations** | Pointer to [**RelationshipToIncidentIntegrationMetadatas**](RelationshipToIncidentIntegrationMetadatas.md) | | [optional] +**LastModifiedByUser** | Pointer to [**RelationshipToUser**](RelationshipToUser.md) | | [optional] +**Postmortem** | Pointer to [**RelationshipToIncidentPostmortem**](RelationshipToIncidentPostmortem.md) | | [optional] + +## Methods + +### NewIncidentResponseRelationships + +`func NewIncidentResponseRelationships() *IncidentResponseRelationships` + +NewIncidentResponseRelationships instantiates a new IncidentResponseRelationships object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentResponseRelationshipsWithDefaults + +`func NewIncidentResponseRelationshipsWithDefaults() *IncidentResponseRelationships` + +NewIncidentResponseRelationshipsWithDefaults instantiates a new IncidentResponseRelationships object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCommanderUser + +`func (o *IncidentResponseRelationships) GetCommanderUser() RelationshipToUser` + +GetCommanderUser returns the CommanderUser field if non-nil, zero value otherwise. + +### GetCommanderUserOk + +`func (o *IncidentResponseRelationships) GetCommanderUserOk() (*RelationshipToUser, bool)` + +GetCommanderUserOk returns a tuple with the CommanderUser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommanderUser + +`func (o *IncidentResponseRelationships) SetCommanderUser(v RelationshipToUser)` + +SetCommanderUser sets CommanderUser field to given value. + +### HasCommanderUser + +`func (o *IncidentResponseRelationships) HasCommanderUser() bool` + +HasCommanderUser returns a boolean if a field has been set. + +### GetCreatedByUser + +`func (o *IncidentResponseRelationships) GetCreatedByUser() RelationshipToUser` + +GetCreatedByUser returns the CreatedByUser field if non-nil, zero value otherwise. + +### GetCreatedByUserOk + +`func (o *IncidentResponseRelationships) GetCreatedByUserOk() (*RelationshipToUser, bool)` + +GetCreatedByUserOk returns a tuple with the CreatedByUser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUser + +`func (o *IncidentResponseRelationships) SetCreatedByUser(v RelationshipToUser)` + +SetCreatedByUser sets CreatedByUser field to given value. + +### HasCreatedByUser + +`func (o *IncidentResponseRelationships) HasCreatedByUser() bool` + +HasCreatedByUser returns a boolean if a field has been set. + +### GetIntegrations + +`func (o *IncidentResponseRelationships) GetIntegrations() RelationshipToIncidentIntegrationMetadatas` + +GetIntegrations returns the Integrations field if non-nil, zero value otherwise. + +### GetIntegrationsOk + +`func (o *IncidentResponseRelationships) GetIntegrationsOk() (*RelationshipToIncidentIntegrationMetadatas, bool)` + +GetIntegrationsOk returns a tuple with the Integrations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIntegrations + +`func (o *IncidentResponseRelationships) SetIntegrations(v RelationshipToIncidentIntegrationMetadatas)` + +SetIntegrations sets Integrations field to given value. + +### HasIntegrations + +`func (o *IncidentResponseRelationships) HasIntegrations() bool` + +HasIntegrations returns a boolean if a field has been set. + +### GetLastModifiedByUser + +`func (o *IncidentResponseRelationships) GetLastModifiedByUser() RelationshipToUser` + +GetLastModifiedByUser returns the LastModifiedByUser field if non-nil, zero value otherwise. + +### GetLastModifiedByUserOk + +`func (o *IncidentResponseRelationships) GetLastModifiedByUserOk() (*RelationshipToUser, bool)` + +GetLastModifiedByUserOk returns a tuple with the LastModifiedByUser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedByUser + +`func (o *IncidentResponseRelationships) SetLastModifiedByUser(v RelationshipToUser)` + +SetLastModifiedByUser sets LastModifiedByUser field to given value. + +### HasLastModifiedByUser + +`func (o *IncidentResponseRelationships) HasLastModifiedByUser() bool` + +HasLastModifiedByUser returns a boolean if a field has been set. + +### GetPostmortem + +`func (o *IncidentResponseRelationships) GetPostmortem() RelationshipToIncidentPostmortem` + +GetPostmortem returns the Postmortem field if non-nil, zero value otherwise. + +### GetPostmortemOk + +`func (o *IncidentResponseRelationships) GetPostmortemOk() (*RelationshipToIncidentPostmortem, bool)` + +GetPostmortemOk returns a tuple with the Postmortem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostmortem + +`func (o *IncidentResponseRelationships) SetPostmortem(v RelationshipToIncidentPostmortem)` + +SetPostmortem sets Postmortem field to given value. + +### HasPostmortem + +`func (o *IncidentResponseRelationships) HasPostmortem() bool` + +HasPostmortem returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentTimelineCellCreateAttributes.md b/api/v2/datadog/docs/IncidentTimelineCellCreateAttributes.md new file mode 100644 index 00000000000..f403fa83732 --- /dev/null +++ b/api/v2/datadog/docs/IncidentTimelineCellCreateAttributes.md @@ -0,0 +1,30 @@ +# IncidentTimelineCellCreateAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewIncidentTimelineCellCreateAttributes + +`func NewIncidentTimelineCellCreateAttributes() *IncidentTimelineCellCreateAttributes` + +NewIncidentTimelineCellCreateAttributes instantiates a new IncidentTimelineCellCreateAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentTimelineCellCreateAttributesWithDefaults + +`func NewIncidentTimelineCellCreateAttributesWithDefaults() *IncidentTimelineCellCreateAttributes` + +NewIncidentTimelineCellCreateAttributesWithDefaults instantiates a new IncidentTimelineCellCreateAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentTimelineCellMarkdownContentType.md b/api/v2/datadog/docs/IncidentTimelineCellMarkdownContentType.md new file mode 100644 index 00000000000..27cfe4001e6 --- /dev/null +++ b/api/v2/datadog/docs/IncidentTimelineCellMarkdownContentType.md @@ -0,0 +1,11 @@ +# IncidentTimelineCellMarkdownContentType + +## Enum + + +* `MARKDOWN` (value: `"markdown"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentTimelineCellMarkdownCreateAttributes.md b/api/v2/datadog/docs/IncidentTimelineCellMarkdownCreateAttributes.md new file mode 100644 index 00000000000..7063d960180 --- /dev/null +++ b/api/v2/datadog/docs/IncidentTimelineCellMarkdownCreateAttributes.md @@ -0,0 +1,98 @@ +# IncidentTimelineCellMarkdownCreateAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CellType** | [**IncidentTimelineCellMarkdownContentType**](IncidentTimelineCellMarkdownContentType.md) | | [default to "markdown"] +**Content** | [**IncidentTimelineCellMarkdownCreateAttributesContent**](IncidentTimelineCellMarkdownCreateAttributes_content.md) | | +**Important** | Pointer to **bool** | A flag indicating whether the timeline cell is important and should be highlighted. | [optional] [default to false] + +## Methods + +### NewIncidentTimelineCellMarkdownCreateAttributes + +`func NewIncidentTimelineCellMarkdownCreateAttributes(cellType IncidentTimelineCellMarkdownContentType, content IncidentTimelineCellMarkdownCreateAttributesContent, ) *IncidentTimelineCellMarkdownCreateAttributes` + +NewIncidentTimelineCellMarkdownCreateAttributes instantiates a new IncidentTimelineCellMarkdownCreateAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentTimelineCellMarkdownCreateAttributesWithDefaults + +`func NewIncidentTimelineCellMarkdownCreateAttributesWithDefaults() *IncidentTimelineCellMarkdownCreateAttributes` + +NewIncidentTimelineCellMarkdownCreateAttributesWithDefaults instantiates a new IncidentTimelineCellMarkdownCreateAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCellType + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) GetCellType() IncidentTimelineCellMarkdownContentType` + +GetCellType returns the CellType field if non-nil, zero value otherwise. + +### GetCellTypeOk + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) GetCellTypeOk() (*IncidentTimelineCellMarkdownContentType, bool)` + +GetCellTypeOk returns a tuple with the CellType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCellType + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) SetCellType(v IncidentTimelineCellMarkdownContentType)` + +SetCellType sets CellType field to given value. + + +### GetContent + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) GetContent() IncidentTimelineCellMarkdownCreateAttributesContent` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) GetContentOk() (*IncidentTimelineCellMarkdownCreateAttributesContent, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) SetContent(v IncidentTimelineCellMarkdownCreateAttributesContent)` + +SetContent sets Content field to given value. + + +### GetImportant + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) GetImportant() bool` + +GetImportant returns the Important field if non-nil, zero value otherwise. + +### GetImportantOk + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) GetImportantOk() (*bool, bool)` + +GetImportantOk returns a tuple with the Important field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImportant + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) SetImportant(v bool)` + +SetImportant sets Important field to given value. + +### HasImportant + +`func (o *IncidentTimelineCellMarkdownCreateAttributes) HasImportant() bool` + +HasImportant returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentTimelineCellMarkdownCreateAttributesContent.md b/api/v2/datadog/docs/IncidentTimelineCellMarkdownCreateAttributesContent.md new file mode 100644 index 00000000000..e4eea7599fe --- /dev/null +++ b/api/v2/datadog/docs/IncidentTimelineCellMarkdownCreateAttributesContent.md @@ -0,0 +1,56 @@ +# IncidentTimelineCellMarkdownCreateAttributesContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | Pointer to **string** | The Markdown content of the cell. | [optional] + +## Methods + +### NewIncidentTimelineCellMarkdownCreateAttributesContent + +`func NewIncidentTimelineCellMarkdownCreateAttributesContent() *IncidentTimelineCellMarkdownCreateAttributesContent` + +NewIncidentTimelineCellMarkdownCreateAttributesContent instantiates a new IncidentTimelineCellMarkdownCreateAttributesContent object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentTimelineCellMarkdownCreateAttributesContentWithDefaults + +`func NewIncidentTimelineCellMarkdownCreateAttributesContentWithDefaults() *IncidentTimelineCellMarkdownCreateAttributesContent` + +NewIncidentTimelineCellMarkdownCreateAttributesContentWithDefaults instantiates a new IncidentTimelineCellMarkdownCreateAttributesContent object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContent + +`func (o *IncidentTimelineCellMarkdownCreateAttributesContent) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *IncidentTimelineCellMarkdownCreateAttributesContent) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *IncidentTimelineCellMarkdownCreateAttributesContent) SetContent(v string)` + +SetContent sets Content field to given value. + +### HasContent + +`func (o *IncidentTimelineCellMarkdownCreateAttributesContent) HasContent() bool` + +HasContent returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentType.md b/api/v2/datadog/docs/IncidentType.md new file mode 100644 index 00000000000..f528886b523 --- /dev/null +++ b/api/v2/datadog/docs/IncidentType.md @@ -0,0 +1,11 @@ +# IncidentType + +## Enum + + +* `INCIDENTS` (value: `"incidents"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentUpdateAttributes.md b/api/v2/datadog/docs/IncidentUpdateAttributes.md new file mode 100644 index 00000000000..43b0b95c2d3 --- /dev/null +++ b/api/v2/datadog/docs/IncidentUpdateAttributes.md @@ -0,0 +1,304 @@ +# IncidentUpdateAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerImpactEnd** | Pointer to [**NullableTime**](time.Time.md) | Timestamp when customers were no longer impacted by the incident. | [optional] +**CustomerImpactScope** | Pointer to **string** | A summary of the impact customers experienced during the incident. | [optional] +**CustomerImpactStart** | Pointer to [**NullableTime**](time.Time.md) | Timestamp when customers began being impacted by the incident. | [optional] +**CustomerImpacted** | Pointer to **bool** | A flag indicating whether the incident caused customer impact. | [optional] +**Detected** | Pointer to [**NullableTime**](time.Time.md) | Timestamp when the incident was detected. | [optional] +**Fields** | Pointer to [**map[string]IncidentFieldAttributes**](IncidentFieldAttributes.md) | A condensed view of the user-defined fields for which to update selections. | [optional] +**NotificationHandles** | Pointer to **[]string** | Notification handles that will be notified of the incident during update. | [optional] +**Resolved** | Pointer to [**NullableTime**](time.Time.md) | Timestamp when the incident's state was set to resolved. | [optional] +**Title** | Pointer to **string** | The title of the incident, which summarizes what happened. | [optional] + +## Methods + +### NewIncidentUpdateAttributes + +`func NewIncidentUpdateAttributes() *IncidentUpdateAttributes` + +NewIncidentUpdateAttributes instantiates a new IncidentUpdateAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentUpdateAttributesWithDefaults + +`func NewIncidentUpdateAttributesWithDefaults() *IncidentUpdateAttributes` + +NewIncidentUpdateAttributesWithDefaults instantiates a new IncidentUpdateAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerImpactEnd + +`func (o *IncidentUpdateAttributes) GetCustomerImpactEnd() time.Time` + +GetCustomerImpactEnd returns the CustomerImpactEnd field if non-nil, zero value otherwise. + +### GetCustomerImpactEndOk + +`func (o *IncidentUpdateAttributes) GetCustomerImpactEndOk() (*time.Time, bool)` + +GetCustomerImpactEndOk returns a tuple with the CustomerImpactEnd field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpactEnd + +`func (o *IncidentUpdateAttributes) SetCustomerImpactEnd(v time.Time)` + +SetCustomerImpactEnd sets CustomerImpactEnd field to given value. + +### HasCustomerImpactEnd + +`func (o *IncidentUpdateAttributes) HasCustomerImpactEnd() bool` + +HasCustomerImpactEnd returns a boolean if a field has been set. + +### SetCustomerImpactEndNil + +`func (o *IncidentUpdateAttributes) SetCustomerImpactEndNil(b bool)` + + SetCustomerImpactEndNil sets the value for CustomerImpactEnd to be an explicit nil + +### UnsetCustomerImpactEnd +`func (o *IncidentUpdateAttributes) UnsetCustomerImpactEnd()` + +UnsetCustomerImpactEnd ensures that no value is present for CustomerImpactEnd, not even an explicit nil +### GetCustomerImpactScope + +`func (o *IncidentUpdateAttributes) GetCustomerImpactScope() string` + +GetCustomerImpactScope returns the CustomerImpactScope field if non-nil, zero value otherwise. + +### GetCustomerImpactScopeOk + +`func (o *IncidentUpdateAttributes) GetCustomerImpactScopeOk() (*string, bool)` + +GetCustomerImpactScopeOk returns a tuple with the CustomerImpactScope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpactScope + +`func (o *IncidentUpdateAttributes) SetCustomerImpactScope(v string)` + +SetCustomerImpactScope sets CustomerImpactScope field to given value. + +### HasCustomerImpactScope + +`func (o *IncidentUpdateAttributes) HasCustomerImpactScope() bool` + +HasCustomerImpactScope returns a boolean if a field has been set. + +### GetCustomerImpactStart + +`func (o *IncidentUpdateAttributes) GetCustomerImpactStart() time.Time` + +GetCustomerImpactStart returns the CustomerImpactStart field if non-nil, zero value otherwise. + +### GetCustomerImpactStartOk + +`func (o *IncidentUpdateAttributes) GetCustomerImpactStartOk() (*time.Time, bool)` + +GetCustomerImpactStartOk returns a tuple with the CustomerImpactStart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpactStart + +`func (o *IncidentUpdateAttributes) SetCustomerImpactStart(v time.Time)` + +SetCustomerImpactStart sets CustomerImpactStart field to given value. + +### HasCustomerImpactStart + +`func (o *IncidentUpdateAttributes) HasCustomerImpactStart() bool` + +HasCustomerImpactStart returns a boolean if a field has been set. + +### SetCustomerImpactStartNil + +`func (o *IncidentUpdateAttributes) SetCustomerImpactStartNil(b bool)` + + SetCustomerImpactStartNil sets the value for CustomerImpactStart to be an explicit nil + +### UnsetCustomerImpactStart +`func (o *IncidentUpdateAttributes) UnsetCustomerImpactStart()` + +UnsetCustomerImpactStart ensures that no value is present for CustomerImpactStart, not even an explicit nil +### GetCustomerImpacted + +`func (o *IncidentUpdateAttributes) GetCustomerImpacted() bool` + +GetCustomerImpacted returns the CustomerImpacted field if non-nil, zero value otherwise. + +### GetCustomerImpactedOk + +`func (o *IncidentUpdateAttributes) GetCustomerImpactedOk() (*bool, bool)` + +GetCustomerImpactedOk returns a tuple with the CustomerImpacted field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerImpacted + +`func (o *IncidentUpdateAttributes) SetCustomerImpacted(v bool)` + +SetCustomerImpacted sets CustomerImpacted field to given value. + +### HasCustomerImpacted + +`func (o *IncidentUpdateAttributes) HasCustomerImpacted() bool` + +HasCustomerImpacted returns a boolean if a field has been set. + +### GetDetected + +`func (o *IncidentUpdateAttributes) GetDetected() time.Time` + +GetDetected returns the Detected field if non-nil, zero value otherwise. + +### GetDetectedOk + +`func (o *IncidentUpdateAttributes) GetDetectedOk() (*time.Time, bool)` + +GetDetectedOk returns a tuple with the Detected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetected + +`func (o *IncidentUpdateAttributes) SetDetected(v time.Time)` + +SetDetected sets Detected field to given value. + +### HasDetected + +`func (o *IncidentUpdateAttributes) HasDetected() bool` + +HasDetected returns a boolean if a field has been set. + +### SetDetectedNil + +`func (o *IncidentUpdateAttributes) SetDetectedNil(b bool)` + + SetDetectedNil sets the value for Detected to be an explicit nil + +### UnsetDetected +`func (o *IncidentUpdateAttributes) UnsetDetected()` + +UnsetDetected ensures that no value is present for Detected, not even an explicit nil +### GetFields + +`func (o *IncidentUpdateAttributes) GetFields() map[string]IncidentFieldAttributes` + +GetFields returns the Fields field if non-nil, zero value otherwise. + +### GetFieldsOk + +`func (o *IncidentUpdateAttributes) GetFieldsOk() (*map[string]IncidentFieldAttributes, bool)` + +GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFields + +`func (o *IncidentUpdateAttributes) SetFields(v map[string]IncidentFieldAttributes)` + +SetFields sets Fields field to given value. + +### HasFields + +`func (o *IncidentUpdateAttributes) HasFields() bool` + +HasFields returns a boolean if a field has been set. + +### GetNotificationHandles + +`func (o *IncidentUpdateAttributes) GetNotificationHandles() []string` + +GetNotificationHandles returns the NotificationHandles field if non-nil, zero value otherwise. + +### GetNotificationHandlesOk + +`func (o *IncidentUpdateAttributes) GetNotificationHandlesOk() (*[]string, bool)` + +GetNotificationHandlesOk returns a tuple with the NotificationHandles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotificationHandles + +`func (o *IncidentUpdateAttributes) SetNotificationHandles(v []string)` + +SetNotificationHandles sets NotificationHandles field to given value. + +### HasNotificationHandles + +`func (o *IncidentUpdateAttributes) HasNotificationHandles() bool` + +HasNotificationHandles returns a boolean if a field has been set. + +### GetResolved + +`func (o *IncidentUpdateAttributes) GetResolved() time.Time` + +GetResolved returns the Resolved field if non-nil, zero value otherwise. + +### GetResolvedOk + +`func (o *IncidentUpdateAttributes) GetResolvedOk() (*time.Time, bool)` + +GetResolvedOk returns a tuple with the Resolved field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResolved + +`func (o *IncidentUpdateAttributes) SetResolved(v time.Time)` + +SetResolved sets Resolved field to given value. + +### HasResolved + +`func (o *IncidentUpdateAttributes) HasResolved() bool` + +HasResolved returns a boolean if a field has been set. + +### SetResolvedNil + +`func (o *IncidentUpdateAttributes) SetResolvedNil(b bool)` + + SetResolvedNil sets the value for Resolved to be an explicit nil + +### UnsetResolved +`func (o *IncidentUpdateAttributes) UnsetResolved()` + +UnsetResolved ensures that no value is present for Resolved, not even an explicit nil +### GetTitle + +`func (o *IncidentUpdateAttributes) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *IncidentUpdateAttributes) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *IncidentUpdateAttributes) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *IncidentUpdateAttributes) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentUpdateData.md b/api/v2/datadog/docs/IncidentUpdateData.md new file mode 100644 index 00000000000..149011db90c --- /dev/null +++ b/api/v2/datadog/docs/IncidentUpdateData.md @@ -0,0 +1,124 @@ +# IncidentUpdateData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | Pointer to [**IncidentUpdateAttributes**](IncidentUpdateAttributes.md) | | [optional] +**Id** | **string** | The team's ID. | +**Relationships** | Pointer to [**IncidentUpdateRelationships**](IncidentUpdateRelationships.md) | | [optional] +**Type** | [**IncidentType**](IncidentType.md) | | [default to "incidents"] + +## Methods + +### NewIncidentUpdateData + +`func NewIncidentUpdateData(id string, type_ IncidentType, ) *IncidentUpdateData` + +NewIncidentUpdateData instantiates a new IncidentUpdateData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentUpdateDataWithDefaults + +`func NewIncidentUpdateDataWithDefaults() *IncidentUpdateData` + +NewIncidentUpdateDataWithDefaults instantiates a new IncidentUpdateData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttributes + +`func (o *IncidentUpdateData) GetAttributes() IncidentUpdateAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *IncidentUpdateData) GetAttributesOk() (*IncidentUpdateAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *IncidentUpdateData) SetAttributes(v IncidentUpdateAttributes)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *IncidentUpdateData) HasAttributes() bool` + +HasAttributes returns a boolean if a field has been set. + +### GetId + +`func (o *IncidentUpdateData) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IncidentUpdateData) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IncidentUpdateData) SetId(v string)` + +SetId sets Id field to given value. + + +### GetRelationships + +`func (o *IncidentUpdateData) GetRelationships() IncidentUpdateRelationships` + +GetRelationships returns the Relationships field if non-nil, zero value otherwise. + +### GetRelationshipsOk + +`func (o *IncidentUpdateData) GetRelationshipsOk() (*IncidentUpdateRelationships, bool)` + +GetRelationshipsOk returns a tuple with the Relationships field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelationships + +`func (o *IncidentUpdateData) SetRelationships(v IncidentUpdateRelationships)` + +SetRelationships sets Relationships field to given value. + +### HasRelationships + +`func (o *IncidentUpdateData) HasRelationships() bool` + +HasRelationships returns a boolean if a field has been set. + +### GetType + +`func (o *IncidentUpdateData) GetType() IncidentType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IncidentUpdateData) GetTypeOk() (*IncidentType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IncidentUpdateData) SetType(v IncidentType)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentUpdateRelationships.md b/api/v2/datadog/docs/IncidentUpdateRelationships.md new file mode 100644 index 00000000000..12e2c4a5d32 --- /dev/null +++ b/api/v2/datadog/docs/IncidentUpdateRelationships.md @@ -0,0 +1,160 @@ +# IncidentUpdateRelationships + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CommanderUser** | Pointer to [**RelationshipToUser**](RelationshipToUser.md) | | [optional] +**CreatedByUser** | Pointer to [**RelationshipToUser**](RelationshipToUser.md) | | [optional] +**Integrations** | Pointer to [**RelationshipToIncidentIntegrationMetadatas**](RelationshipToIncidentIntegrationMetadatas.md) | | [optional] +**LastModifiedByUser** | Pointer to [**RelationshipToUser**](RelationshipToUser.md) | | [optional] +**Postmortem** | Pointer to [**RelationshipToIncidentPostmortem**](RelationshipToIncidentPostmortem.md) | | [optional] + +## Methods + +### NewIncidentUpdateRelationships + +`func NewIncidentUpdateRelationships() *IncidentUpdateRelationships` + +NewIncidentUpdateRelationships instantiates a new IncidentUpdateRelationships object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentUpdateRelationshipsWithDefaults + +`func NewIncidentUpdateRelationshipsWithDefaults() *IncidentUpdateRelationships` + +NewIncidentUpdateRelationshipsWithDefaults instantiates a new IncidentUpdateRelationships object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCommanderUser + +`func (o *IncidentUpdateRelationships) GetCommanderUser() RelationshipToUser` + +GetCommanderUser returns the CommanderUser field if non-nil, zero value otherwise. + +### GetCommanderUserOk + +`func (o *IncidentUpdateRelationships) GetCommanderUserOk() (*RelationshipToUser, bool)` + +GetCommanderUserOk returns a tuple with the CommanderUser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommanderUser + +`func (o *IncidentUpdateRelationships) SetCommanderUser(v RelationshipToUser)` + +SetCommanderUser sets CommanderUser field to given value. + +### HasCommanderUser + +`func (o *IncidentUpdateRelationships) HasCommanderUser() bool` + +HasCommanderUser returns a boolean if a field has been set. + +### GetCreatedByUser + +`func (o *IncidentUpdateRelationships) GetCreatedByUser() RelationshipToUser` + +GetCreatedByUser returns the CreatedByUser field if non-nil, zero value otherwise. + +### GetCreatedByUserOk + +`func (o *IncidentUpdateRelationships) GetCreatedByUserOk() (*RelationshipToUser, bool)` + +GetCreatedByUserOk returns a tuple with the CreatedByUser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedByUser + +`func (o *IncidentUpdateRelationships) SetCreatedByUser(v RelationshipToUser)` + +SetCreatedByUser sets CreatedByUser field to given value. + +### HasCreatedByUser + +`func (o *IncidentUpdateRelationships) HasCreatedByUser() bool` + +HasCreatedByUser returns a boolean if a field has been set. + +### GetIntegrations + +`func (o *IncidentUpdateRelationships) GetIntegrations() RelationshipToIncidentIntegrationMetadatas` + +GetIntegrations returns the Integrations field if non-nil, zero value otherwise. + +### GetIntegrationsOk + +`func (o *IncidentUpdateRelationships) GetIntegrationsOk() (*RelationshipToIncidentIntegrationMetadatas, bool)` + +GetIntegrationsOk returns a tuple with the Integrations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIntegrations + +`func (o *IncidentUpdateRelationships) SetIntegrations(v RelationshipToIncidentIntegrationMetadatas)` + +SetIntegrations sets Integrations field to given value. + +### HasIntegrations + +`func (o *IncidentUpdateRelationships) HasIntegrations() bool` + +HasIntegrations returns a boolean if a field has been set. + +### GetLastModifiedByUser + +`func (o *IncidentUpdateRelationships) GetLastModifiedByUser() RelationshipToUser` + +GetLastModifiedByUser returns the LastModifiedByUser field if non-nil, zero value otherwise. + +### GetLastModifiedByUserOk + +`func (o *IncidentUpdateRelationships) GetLastModifiedByUserOk() (*RelationshipToUser, bool)` + +GetLastModifiedByUserOk returns a tuple with the LastModifiedByUser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModifiedByUser + +`func (o *IncidentUpdateRelationships) SetLastModifiedByUser(v RelationshipToUser)` + +SetLastModifiedByUser sets LastModifiedByUser field to given value. + +### HasLastModifiedByUser + +`func (o *IncidentUpdateRelationships) HasLastModifiedByUser() bool` + +HasLastModifiedByUser returns a boolean if a field has been set. + +### GetPostmortem + +`func (o *IncidentUpdateRelationships) GetPostmortem() RelationshipToIncidentPostmortem` + +GetPostmortem returns the Postmortem field if non-nil, zero value otherwise. + +### GetPostmortemOk + +`func (o *IncidentUpdateRelationships) GetPostmortemOk() (*RelationshipToIncidentPostmortem, bool)` + +GetPostmortemOk returns a tuple with the Postmortem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostmortem + +`func (o *IncidentUpdateRelationships) SetPostmortem(v RelationshipToIncidentPostmortem)` + +SetPostmortem sets Postmortem field to given value. + +### HasPostmortem + +`func (o *IncidentUpdateRelationships) HasPostmortem() bool` + +HasPostmortem returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentUpdateRequest.md b/api/v2/datadog/docs/IncidentUpdateRequest.md new file mode 100644 index 00000000000..f59495a4d14 --- /dev/null +++ b/api/v2/datadog/docs/IncidentUpdateRequest.md @@ -0,0 +1,51 @@ +# IncidentUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**IncidentUpdateData**](IncidentUpdateData.md) | | + +## Methods + +### NewIncidentUpdateRequest + +`func NewIncidentUpdateRequest(data IncidentUpdateData, ) *IncidentUpdateRequest` + +NewIncidentUpdateRequest instantiates a new IncidentUpdateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentUpdateRequestWithDefaults + +`func NewIncidentUpdateRequestWithDefaults() *IncidentUpdateRequest` + +NewIncidentUpdateRequestWithDefaults instantiates a new IncidentUpdateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *IncidentUpdateRequest) GetData() IncidentUpdateData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *IncidentUpdateRequest) GetDataOk() (*IncidentUpdateData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *IncidentUpdateRequest) SetData(v IncidentUpdateData)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/IncidentsApi.md b/api/v2/datadog/docs/IncidentsApi.md new file mode 100644 index 00000000000..f958e4adaac --- /dev/null +++ b/api/v2/datadog/docs/IncidentsApi.md @@ -0,0 +1,436 @@ +# \IncidentsApi + +All URIs are relative to *https://api.datadoghq.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateIncident**](IncidentsApi.md#CreateIncident) | **Post** /api/v2/incidents | Create an incident +[**DeleteIncident**](IncidentsApi.md#DeleteIncident) | **Delete** /api/v2/incidents/{incident_id} | Delete an existing incident +[**GetIncident**](IncidentsApi.md#GetIncident) | **Get** /api/v2/incidents/{incident_id} | Get the details of an incident +[**ListIncidents**](IncidentsApi.md#ListIncidents) | **Get** /api/v2/incidents | Get a list of incidents +[**UpdateIncident**](IncidentsApi.md#UpdateIncident) | **Patch** /api/v2/incidents/{incident_id} | Update an existing incident + + + +## CreateIncident + +> IncidentResponse CreateIncident(ctx).Body(body).Execute() + +Create an incident + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog" +) + +func main() { + ctx := context.WithValue( + context.Background(), + datadog.ContextAPIKeys, + map[string]datadog.APIKey{ + "apiKeyAuth": { + Key: os.Getenv("DD_CLIENT_API_KEY"), + }, + "appKeyAuth": { + Key: os.Getenv("DD_CLIENT_APP_KEY"), + }, + }, + ) + + body := *datadog.NewIncidentCreateRequest(*datadog.NewIncidentCreateData(*datadog.NewIncidentCreateAttributes(false, "A test incident title"), datadog.IncidentType("incidents"))) // IncidentCreateRequest | Incident payload. + + configuration := datadog.NewConfiguration() + configuration.SetUnstableOperationEnabled("CreateIncident", true) + + api_client := datadog.NewAPIClient(configuration) + resp, r, err := api_client.IncidentsApi.CreateIncident(ctx).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IncidentsApi.CreateIncident``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateIncident`: IncidentResponse + fmt.Fprintf(os.Stdout, "Response from `IncidentsApi.CreateIncident`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateIncidentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**IncidentCreateRequest**](IncidentCreateRequest.md) | Incident payload. | + +### Return type + +[**IncidentResponse**](IncidentResponse.md) + +### Authorization + +[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteIncident + +> DeleteIncident(ctx, incidentId).Execute() + +Delete an existing incident + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog" +) + +func main() { + ctx := context.WithValue( + context.Background(), + datadog.ContextAPIKeys, + map[string]datadog.APIKey{ + "apiKeyAuth": { + Key: os.Getenv("DD_CLIENT_API_KEY"), + }, + "appKeyAuth": { + Key: os.Getenv("DD_CLIENT_APP_KEY"), + }, + }, + ) + + incidentId := "incidentId_example" // string | The UUID the incident. + + configuration := datadog.NewConfiguration() + configuration.SetUnstableOperationEnabled("DeleteIncident", true) + + api_client := datadog.NewAPIClient(configuration) + r, err := api_client.IncidentsApi.DeleteIncident(ctx, incidentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IncidentsApi.DeleteIncident``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**incidentId** | **string** | The UUID the incident. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteIncidentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetIncident + +> IncidentResponse GetIncident(ctx, incidentId).Include(include).Execute() + +Get the details of an incident + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog" +) + +func main() { + ctx := context.WithValue( + context.Background(), + datadog.ContextAPIKeys, + map[string]datadog.APIKey{ + "apiKeyAuth": { + Key: os.Getenv("DD_CLIENT_API_KEY"), + }, + "appKeyAuth": { + Key: os.Getenv("DD_CLIENT_APP_KEY"), + }, + }, + ) + + incidentId := "incidentId_example" // string | The UUID the incident. + include := []string{"Include_example"} // []string | Specifies which types of related objects should be included in the response. (optional) + + configuration := datadog.NewConfiguration() + configuration.SetUnstableOperationEnabled("GetIncident", true) + + api_client := datadog.NewAPIClient(configuration) + resp, r, err := api_client.IncidentsApi.GetIncident(ctx, incidentId).Include(include).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IncidentsApi.GetIncident``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetIncident`: IncidentResponse + fmt.Fprintf(os.Stdout, "Response from `IncidentsApi.GetIncident`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**incidentId** | **string** | The UUID the incident. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetIncidentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **include** | **[]string** | Specifies which types of related objects should be included in the response. | + +### Return type + +[**IncidentResponse**](IncidentResponse.md) + +### Authorization + +[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIncidents + +> IncidentsResponse ListIncidents(ctx).Include(include).PageSize(pageSize).PageOffset(pageOffset).Execute() + +Get a list of incidents + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog" +) + +func main() { + ctx := context.WithValue( + context.Background(), + datadog.ContextAPIKeys, + map[string]datadog.APIKey{ + "apiKeyAuth": { + Key: os.Getenv("DD_CLIENT_API_KEY"), + }, + "appKeyAuth": { + Key: os.Getenv("DD_CLIENT_APP_KEY"), + }, + }, + ) + + include := []string{"Include_example"} // []string | Specifies which types of related objects should be included in the response. (optional) + pageSize := int64(789) // int64 | Size for a given page. (optional) (default to 10) + pageOffset := int64(789) // int64 | Specific offset to use as the beginning of the returned page. (optional) (default to 0) + + configuration := datadog.NewConfiguration() + configuration.SetUnstableOperationEnabled("ListIncidents", true) + + api_client := datadog.NewAPIClient(configuration) + resp, r, err := api_client.IncidentsApi.ListIncidents(ctx).Include(include).PageSize(pageSize).PageOffset(pageOffset).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IncidentsApi.ListIncidents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListIncidents`: IncidentsResponse + fmt.Fprintf(os.Stdout, "Response from `IncidentsApi.ListIncidents`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListIncidentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **include** | **[]string** | Specifies which types of related objects should be included in the response. | + **pageSize** | **int64** | Size for a given page. | [default to 10] + **pageOffset** | **int64** | Specific offset to use as the beginning of the returned page. | [default to 0] + +### Return type + +[**IncidentsResponse**](IncidentsResponse.md) + +### Authorization + +[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateIncident + +> IncidentResponse UpdateIncident(ctx, incidentId).Body(body).Execute() + +Update an existing incident + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog" +) + +func main() { + ctx := context.WithValue( + context.Background(), + datadog.ContextAPIKeys, + map[string]datadog.APIKey{ + "apiKeyAuth": { + Key: os.Getenv("DD_CLIENT_API_KEY"), + }, + "appKeyAuth": { + Key: os.Getenv("DD_CLIENT_APP_KEY"), + }, + }, + ) + + incidentId := "incidentId_example" // string | The UUID the incident. + body := *datadog.NewIncidentUpdateRequest(*datadog.NewIncidentUpdateData("00000000-0000-0000-0000-000000000000", datadog.IncidentType("incidents"))) // IncidentUpdateRequest | Incident Payload. + + configuration := datadog.NewConfiguration() + configuration.SetUnstableOperationEnabled("UpdateIncident", true) + + api_client := datadog.NewAPIClient(configuration) + resp, r, err := api_client.IncidentsApi.UpdateIncident(ctx, incidentId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IncidentsApi.UpdateIncident``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateIncident`: IncidentResponse + fmt.Fprintf(os.Stdout, "Response from `IncidentsApi.UpdateIncident`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**incidentId** | **string** | The UUID the incident. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateIncidentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**IncidentUpdateRequest**](IncidentUpdateRequest.md) | Incident Payload. | + +### Return type + +[**IncidentResponse**](IncidentResponse.md) + +### Authorization + +[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/api/v2/datadog/docs/IncidentsResponse.md b/api/v2/datadog/docs/IncidentsResponse.md new file mode 100644 index 00000000000..36863ba3196 --- /dev/null +++ b/api/v2/datadog/docs/IncidentsResponse.md @@ -0,0 +1,103 @@ +# IncidentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]IncidentResponseData**](IncidentResponseData.md) | An array of incidents. | +**Included** | Pointer to [**[]IncidentResponseIncludedItem**](IncidentResponseIncludedItem.md) | Included related resources that the user requested. | [optional] [readonly] +**Meta** | Pointer to [**IncidentServicesResponseMeta**](IncidentServicesResponse_meta.md) | | [optional] + +## Methods + +### NewIncidentsResponse + +`func NewIncidentsResponse(data []IncidentResponseData, ) *IncidentsResponse` + +NewIncidentsResponse instantiates a new IncidentsResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncidentsResponseWithDefaults + +`func NewIncidentsResponseWithDefaults() *IncidentsResponse` + +NewIncidentsResponseWithDefaults instantiates a new IncidentsResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *IncidentsResponse) GetData() []IncidentResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *IncidentsResponse) GetDataOk() (*[]IncidentResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *IncidentsResponse) SetData(v []IncidentResponseData)` + +SetData sets Data field to given value. + + +### GetIncluded + +`func (o *IncidentsResponse) GetIncluded() []IncidentResponseIncludedItem` + +GetIncluded returns the Included field if non-nil, zero value otherwise. + +### GetIncludedOk + +`func (o *IncidentsResponse) GetIncludedOk() (*[]IncidentResponseIncludedItem, bool)` + +GetIncludedOk returns a tuple with the Included field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncluded + +`func (o *IncidentsResponse) SetIncluded(v []IncidentResponseIncludedItem)` + +SetIncluded sets Included field to given value. + +### HasIncluded + +`func (o *IncidentsResponse) HasIncluded() bool` + +HasIncluded returns a boolean if a field has been set. + +### GetMeta + +`func (o *IncidentsResponse) GetMeta() IncidentServicesResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *IncidentsResponse) GetMetaOk() (*IncidentServicesResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *IncidentsResponse) SetMeta(v IncidentServicesResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *IncidentsResponse) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/RelationshipToIncidentIntegrationMetadataData.md b/api/v2/datadog/docs/RelationshipToIncidentIntegrationMetadataData.md new file mode 100644 index 00000000000..3e07e508f90 --- /dev/null +++ b/api/v2/datadog/docs/RelationshipToIncidentIntegrationMetadataData.md @@ -0,0 +1,72 @@ +# RelationshipToIncidentIntegrationMetadataData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier that represents the integration metadata. | +**Type** | [**IncidentIntegrationMetadataType**](IncidentIntegrationMetadataType.md) | | [default to "incident_integration_metadata"] + +## Methods + +### NewRelationshipToIncidentIntegrationMetadataData + +`func NewRelationshipToIncidentIntegrationMetadataData(id string, type_ IncidentIntegrationMetadataType, ) *RelationshipToIncidentIntegrationMetadataData` + +NewRelationshipToIncidentIntegrationMetadataData instantiates a new RelationshipToIncidentIntegrationMetadataData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipToIncidentIntegrationMetadataDataWithDefaults + +`func NewRelationshipToIncidentIntegrationMetadataDataWithDefaults() *RelationshipToIncidentIntegrationMetadataData` + +NewRelationshipToIncidentIntegrationMetadataDataWithDefaults instantiates a new RelationshipToIncidentIntegrationMetadataData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RelationshipToIncidentIntegrationMetadataData) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RelationshipToIncidentIntegrationMetadataData) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RelationshipToIncidentIntegrationMetadataData) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *RelationshipToIncidentIntegrationMetadataData) GetType() IncidentIntegrationMetadataType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RelationshipToIncidentIntegrationMetadataData) GetTypeOk() (*IncidentIntegrationMetadataType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RelationshipToIncidentIntegrationMetadataData) SetType(v IncidentIntegrationMetadataType)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/RelationshipToIncidentIntegrationMetadatas.md b/api/v2/datadog/docs/RelationshipToIncidentIntegrationMetadatas.md new file mode 100644 index 00000000000..b658444998d --- /dev/null +++ b/api/v2/datadog/docs/RelationshipToIncidentIntegrationMetadatas.md @@ -0,0 +1,51 @@ +# RelationshipToIncidentIntegrationMetadatas + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]RelationshipToIncidentIntegrationMetadataData**](RelationshipToIncidentIntegrationMetadataData.md) | The integration metadata relationship array | + +## Methods + +### NewRelationshipToIncidentIntegrationMetadatas + +`func NewRelationshipToIncidentIntegrationMetadatas(data []RelationshipToIncidentIntegrationMetadataData, ) *RelationshipToIncidentIntegrationMetadatas` + +NewRelationshipToIncidentIntegrationMetadatas instantiates a new RelationshipToIncidentIntegrationMetadatas object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipToIncidentIntegrationMetadatasWithDefaults + +`func NewRelationshipToIncidentIntegrationMetadatasWithDefaults() *RelationshipToIncidentIntegrationMetadatas` + +NewRelationshipToIncidentIntegrationMetadatasWithDefaults instantiates a new RelationshipToIncidentIntegrationMetadatas object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RelationshipToIncidentIntegrationMetadatas) GetData() []RelationshipToIncidentIntegrationMetadataData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RelationshipToIncidentIntegrationMetadatas) GetDataOk() (*[]RelationshipToIncidentIntegrationMetadataData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *RelationshipToIncidentIntegrationMetadatas) SetData(v []RelationshipToIncidentIntegrationMetadataData)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/RelationshipToIncidentPostmortem.md b/api/v2/datadog/docs/RelationshipToIncidentPostmortem.md new file mode 100644 index 00000000000..8ef6964b76e --- /dev/null +++ b/api/v2/datadog/docs/RelationshipToIncidentPostmortem.md @@ -0,0 +1,51 @@ +# RelationshipToIncidentPostmortem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**RelationshipToIncidentPostmortemData**](RelationshipToIncidentPostmortemData.md) | | + +## Methods + +### NewRelationshipToIncidentPostmortem + +`func NewRelationshipToIncidentPostmortem(data RelationshipToIncidentPostmortemData, ) *RelationshipToIncidentPostmortem` + +NewRelationshipToIncidentPostmortem instantiates a new RelationshipToIncidentPostmortem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipToIncidentPostmortemWithDefaults + +`func NewRelationshipToIncidentPostmortemWithDefaults() *RelationshipToIncidentPostmortem` + +NewRelationshipToIncidentPostmortemWithDefaults instantiates a new RelationshipToIncidentPostmortem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RelationshipToIncidentPostmortem) GetData() RelationshipToIncidentPostmortemData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RelationshipToIncidentPostmortem) GetDataOk() (*RelationshipToIncidentPostmortemData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *RelationshipToIncidentPostmortem) SetData(v RelationshipToIncidentPostmortemData)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/docs/RelationshipToIncidentPostmortemData.md b/api/v2/datadog/docs/RelationshipToIncidentPostmortemData.md new file mode 100644 index 00000000000..52a446c7b12 --- /dev/null +++ b/api/v2/datadog/docs/RelationshipToIncidentPostmortemData.md @@ -0,0 +1,72 @@ +# RelationshipToIncidentPostmortemData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier that represents the postmortem. | +**Type** | [**IncidentPostmortemType**](IncidentPostmortemType.md) | | [default to "incident_postmortems"] + +## Methods + +### NewRelationshipToIncidentPostmortemData + +`func NewRelationshipToIncidentPostmortemData(id string, type_ IncidentPostmortemType, ) *RelationshipToIncidentPostmortemData` + +NewRelationshipToIncidentPostmortemData instantiates a new RelationshipToIncidentPostmortemData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipToIncidentPostmortemDataWithDefaults + +`func NewRelationshipToIncidentPostmortemDataWithDefaults() *RelationshipToIncidentPostmortemData` + +NewRelationshipToIncidentPostmortemDataWithDefaults instantiates a new RelationshipToIncidentPostmortemData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RelationshipToIncidentPostmortemData) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RelationshipToIncidentPostmortemData) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RelationshipToIncidentPostmortemData) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *RelationshipToIncidentPostmortemData) GetType() IncidentPostmortemType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RelationshipToIncidentPostmortemData) GetTypeOk() (*IncidentPostmortemType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RelationshipToIncidentPostmortemData) SetType(v IncidentPostmortemType)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/api/v2/datadog/model_incident_create_attributes.go b/api/v2/datadog/model_incident_create_attributes.go new file mode 100644 index 00000000000..314be7f01b3 --- /dev/null +++ b/api/v2/datadog/model_incident_create_attributes.go @@ -0,0 +1,246 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentCreateAttributes The incident's attributes for a create request. +type IncidentCreateAttributes struct { + // A flag indicating whether the incident caused customer impact. + CustomerImpacted bool `json:"customer_impacted"` + // A condensed view of the user-defined fields for which to create initial selections. + Fields *map[string]IncidentFieldAttributes `json:"fields,omitempty"` + // An array of initial timeline cells to be placed at the beginning of the incident timeline. + InitialTimelineCells *[]IncidentTimelineCellCreateAttributes `json:"initial_timeline_cells,omitempty"` + // Notification handles that will be notified of the incident at creation. + NotificationHandles *[]string `json:"notification_handles,omitempty"` + // The title of the incident, which summarizes what happened. + Title string `json:"title"` +} + +// NewIncidentCreateAttributes instantiates a new IncidentCreateAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentCreateAttributes(customerImpacted bool, title string) *IncidentCreateAttributes { + this := IncidentCreateAttributes{} + this.CustomerImpacted = customerImpacted + this.Title = title + return &this +} + +// NewIncidentCreateAttributesWithDefaults instantiates a new IncidentCreateAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentCreateAttributesWithDefaults() *IncidentCreateAttributes { + this := IncidentCreateAttributes{} + return &this +} + +// GetCustomerImpacted returns the CustomerImpacted field value +func (o *IncidentCreateAttributes) GetCustomerImpacted() bool { + if o == nil { + var ret bool + return ret + } + + return o.CustomerImpacted +} + +// GetCustomerImpactedOk returns a tuple with the CustomerImpacted field value +// and a boolean to check if the value has been set. +func (o *IncidentCreateAttributes) GetCustomerImpactedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.CustomerImpacted, true +} + +// SetCustomerImpacted sets field value +func (o *IncidentCreateAttributes) SetCustomerImpacted(v bool) { + o.CustomerImpacted = v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *IncidentCreateAttributes) GetFields() map[string]IncidentFieldAttributes { + if o == nil || o.Fields == nil { + var ret map[string]IncidentFieldAttributes + return ret + } + return *o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentCreateAttributes) GetFieldsOk() (*map[string]IncidentFieldAttributes, bool) { + if o == nil || o.Fields == nil { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *IncidentCreateAttributes) HasFields() bool { + if o != nil && o.Fields != nil { + return true + } + + return false +} + +// SetFields gets a reference to the given map[string]IncidentFieldAttributes and assigns it to the Fields field. +func (o *IncidentCreateAttributes) SetFields(v map[string]IncidentFieldAttributes) { + o.Fields = &v +} + +// GetInitialTimelineCells returns the InitialTimelineCells field value if set, zero value otherwise. +func (o *IncidentCreateAttributes) GetInitialTimelineCells() []IncidentTimelineCellCreateAttributes { + if o == nil || o.InitialTimelineCells == nil { + var ret []IncidentTimelineCellCreateAttributes + return ret + } + return *o.InitialTimelineCells +} + +// GetInitialTimelineCellsOk returns a tuple with the InitialTimelineCells field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentCreateAttributes) GetInitialTimelineCellsOk() (*[]IncidentTimelineCellCreateAttributes, bool) { + if o == nil || o.InitialTimelineCells == nil { + return nil, false + } + return o.InitialTimelineCells, true +} + +// HasInitialTimelineCells returns a boolean if a field has been set. +func (o *IncidentCreateAttributes) HasInitialTimelineCells() bool { + if o != nil && o.InitialTimelineCells != nil { + return true + } + + return false +} + +// SetInitialTimelineCells gets a reference to the given []IncidentTimelineCellCreateAttributes and assigns it to the InitialTimelineCells field. +func (o *IncidentCreateAttributes) SetInitialTimelineCells(v []IncidentTimelineCellCreateAttributes) { + o.InitialTimelineCells = &v +} + +// GetNotificationHandles returns the NotificationHandles field value if set, zero value otherwise. +func (o *IncidentCreateAttributes) GetNotificationHandles() []string { + if o == nil || o.NotificationHandles == nil { + var ret []string + return ret + } + return *o.NotificationHandles +} + +// GetNotificationHandlesOk returns a tuple with the NotificationHandles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentCreateAttributes) GetNotificationHandlesOk() (*[]string, bool) { + if o == nil || o.NotificationHandles == nil { + return nil, false + } + return o.NotificationHandles, true +} + +// HasNotificationHandles returns a boolean if a field has been set. +func (o *IncidentCreateAttributes) HasNotificationHandles() bool { + if o != nil && o.NotificationHandles != nil { + return true + } + + return false +} + +// SetNotificationHandles gets a reference to the given []string and assigns it to the NotificationHandles field. +func (o *IncidentCreateAttributes) SetNotificationHandles(v []string) { + o.NotificationHandles = &v +} + +// GetTitle returns the Title field value +func (o *IncidentCreateAttributes) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *IncidentCreateAttributes) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *IncidentCreateAttributes) SetTitle(v string) { + o.Title = v +} + +func (o IncidentCreateAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["customer_impacted"] = o.CustomerImpacted + } + if o.Fields != nil { + toSerialize["fields"] = o.Fields + } + if o.InitialTimelineCells != nil { + toSerialize["initial_timeline_cells"] = o.InitialTimelineCells + } + if o.NotificationHandles != nil { + toSerialize["notification_handles"] = o.NotificationHandles + } + if true { + toSerialize["title"] = o.Title + } + return json.Marshal(toSerialize) +} + +type NullableIncidentCreateAttributes struct { + value *IncidentCreateAttributes + isSet bool +} + +func (v NullableIncidentCreateAttributes) Get() *IncidentCreateAttributes { + return v.value +} + +func (v *NullableIncidentCreateAttributes) Set(val *IncidentCreateAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentCreateAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentCreateAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentCreateAttributes(val *IncidentCreateAttributes) *NullableIncidentCreateAttributes { + return &NullableIncidentCreateAttributes{value: val, isSet: true} +} + +func (v NullableIncidentCreateAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentCreateAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_create_data.go b/api/v2/datadog/model_incident_create_data.go new file mode 100644 index 00000000000..ac7ab1a5251 --- /dev/null +++ b/api/v2/datadog/model_incident_create_data.go @@ -0,0 +1,171 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentCreateData Incident data for a create request. +type IncidentCreateData struct { + Attributes IncidentCreateAttributes `json:"attributes"` + Relationships *IncidentCreateRelationships `json:"relationships,omitempty"` + Type IncidentType `json:"type"` +} + +// NewIncidentCreateData instantiates a new IncidentCreateData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentCreateData(attributes IncidentCreateAttributes, type_ IncidentType) *IncidentCreateData { + this := IncidentCreateData{} + this.Attributes = attributes + this.Type = type_ + return &this +} + +// NewIncidentCreateDataWithDefaults instantiates a new IncidentCreateData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentCreateDataWithDefaults() *IncidentCreateData { + this := IncidentCreateData{} + var type_ IncidentType = "incidents" + this.Type = type_ + return &this +} + +// GetAttributes returns the Attributes field value +func (o *IncidentCreateData) GetAttributes() IncidentCreateAttributes { + if o == nil { + var ret IncidentCreateAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *IncidentCreateData) GetAttributesOk() (*IncidentCreateAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *IncidentCreateData) SetAttributes(v IncidentCreateAttributes) { + o.Attributes = v +} + +// GetRelationships returns the Relationships field value if set, zero value otherwise. +func (o *IncidentCreateData) GetRelationships() IncidentCreateRelationships { + if o == nil || o.Relationships == nil { + var ret IncidentCreateRelationships + return ret + } + return *o.Relationships +} + +// GetRelationshipsOk returns a tuple with the Relationships field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentCreateData) GetRelationshipsOk() (*IncidentCreateRelationships, bool) { + if o == nil || o.Relationships == nil { + return nil, false + } + return o.Relationships, true +} + +// HasRelationships returns a boolean if a field has been set. +func (o *IncidentCreateData) HasRelationships() bool { + if o != nil && o.Relationships != nil { + return true + } + + return false +} + +// SetRelationships gets a reference to the given IncidentCreateRelationships and assigns it to the Relationships field. +func (o *IncidentCreateData) SetRelationships(v IncidentCreateRelationships) { + o.Relationships = &v +} + +// GetType returns the Type field value +func (o *IncidentCreateData) GetType() IncidentType { + if o == nil { + var ret IncidentType + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *IncidentCreateData) GetTypeOk() (*IncidentType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *IncidentCreateData) SetType(v IncidentType) { + o.Type = v +} + +func (o IncidentCreateData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["attributes"] = o.Attributes + } + if o.Relationships != nil { + toSerialize["relationships"] = o.Relationships + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableIncidentCreateData struct { + value *IncidentCreateData + isSet bool +} + +func (v NullableIncidentCreateData) Get() *IncidentCreateData { + return v.value +} + +func (v *NullableIncidentCreateData) Set(val *IncidentCreateData) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentCreateData) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentCreateData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentCreateData(val *IncidentCreateData) *NullableIncidentCreateData { + return &NullableIncidentCreateData{value: val, isSet: true} +} + +func (v NullableIncidentCreateData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentCreateData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_create_relationships.go b/api/v2/datadog/model_incident_create_relationships.go new file mode 100644 index 00000000000..03c6be48f1a --- /dev/null +++ b/api/v2/datadog/model_incident_create_relationships.go @@ -0,0 +1,104 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentCreateRelationships The relationships the incident will have with other resources once created. +type IncidentCreateRelationships struct { + Commander RelationshipToUser `json:"commander"` +} + +// NewIncidentCreateRelationships instantiates a new IncidentCreateRelationships object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentCreateRelationships(commander RelationshipToUser) *IncidentCreateRelationships { + this := IncidentCreateRelationships{} + this.Commander = commander + return &this +} + +// NewIncidentCreateRelationshipsWithDefaults instantiates a new IncidentCreateRelationships object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentCreateRelationshipsWithDefaults() *IncidentCreateRelationships { + this := IncidentCreateRelationships{} + return &this +} + +// GetCommander returns the Commander field value +func (o *IncidentCreateRelationships) GetCommander() RelationshipToUser { + if o == nil { + var ret RelationshipToUser + return ret + } + + return o.Commander +} + +// GetCommanderOk returns a tuple with the Commander field value +// and a boolean to check if the value has been set. +func (o *IncidentCreateRelationships) GetCommanderOk() (*RelationshipToUser, bool) { + if o == nil { + return nil, false + } + return &o.Commander, true +} + +// SetCommander sets field value +func (o *IncidentCreateRelationships) SetCommander(v RelationshipToUser) { + o.Commander = v +} + +func (o IncidentCreateRelationships) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["commander"] = o.Commander + } + return json.Marshal(toSerialize) +} + +type NullableIncidentCreateRelationships struct { + value *IncidentCreateRelationships + isSet bool +} + +func (v NullableIncidentCreateRelationships) Get() *IncidentCreateRelationships { + return v.value +} + +func (v *NullableIncidentCreateRelationships) Set(val *IncidentCreateRelationships) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentCreateRelationships) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentCreateRelationships) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentCreateRelationships(val *IncidentCreateRelationships) *NullableIncidentCreateRelationships { + return &NullableIncidentCreateRelationships{value: val, isSet: true} +} + +func (v NullableIncidentCreateRelationships) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentCreateRelationships) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_create_request.go b/api/v2/datadog/model_incident_create_request.go new file mode 100644 index 00000000000..7730c8c4009 --- /dev/null +++ b/api/v2/datadog/model_incident_create_request.go @@ -0,0 +1,104 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentCreateRequest Create request for an incident. +type IncidentCreateRequest struct { + Data IncidentCreateData `json:"data"` +} + +// NewIncidentCreateRequest instantiates a new IncidentCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentCreateRequest(data IncidentCreateData) *IncidentCreateRequest { + this := IncidentCreateRequest{} + this.Data = data + return &this +} + +// NewIncidentCreateRequestWithDefaults instantiates a new IncidentCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentCreateRequestWithDefaults() *IncidentCreateRequest { + this := IncidentCreateRequest{} + return &this +} + +// GetData returns the Data field value +func (o *IncidentCreateRequest) GetData() IncidentCreateData { + if o == nil { + var ret IncidentCreateData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *IncidentCreateRequest) GetDataOk() (*IncidentCreateData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *IncidentCreateRequest) SetData(v IncidentCreateData) { + o.Data = v +} + +func (o IncidentCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableIncidentCreateRequest struct { + value *IncidentCreateRequest + isSet bool +} + +func (v NullableIncidentCreateRequest) Get() *IncidentCreateRequest { + return v.value +} + +func (v *NullableIncidentCreateRequest) Set(val *IncidentCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentCreateRequest(val *IncidentCreateRequest) *NullableIncidentCreateRequest { + return &NullableIncidentCreateRequest{value: val, isSet: true} +} + +func (v NullableIncidentCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_field_attributes.go b/api/v2/datadog/model_incident_field_attributes.go new file mode 100644 index 00000000000..87d52e137fd --- /dev/null +++ b/api/v2/datadog/model_incident_field_attributes.go @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentFieldAttributes - Dynamic fields for which selections can be made, with field names as keys. +type IncidentFieldAttributes struct { + IncidentFieldAttributesMultipleValue *IncidentFieldAttributesMultipleValue + IncidentFieldAttributesSingleValue *IncidentFieldAttributesSingleValue +} + +// IncidentFieldAttributesMultipleValueAsIncidentFieldAttributes is a convenience function that returns IncidentFieldAttributesMultipleValue wrapped in IncidentFieldAttributes +func IncidentFieldAttributesMultipleValueAsIncidentFieldAttributes(v *IncidentFieldAttributesMultipleValue) IncidentFieldAttributes { + return IncidentFieldAttributes{IncidentFieldAttributesMultipleValue: v} +} + +// IncidentFieldAttributesSingleValueAsIncidentFieldAttributes is a convenience function that returns IncidentFieldAttributesSingleValue wrapped in IncidentFieldAttributes +func IncidentFieldAttributesSingleValueAsIncidentFieldAttributes(v *IncidentFieldAttributesSingleValue) IncidentFieldAttributes { + return IncidentFieldAttributes{IncidentFieldAttributesSingleValue: v} +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *IncidentFieldAttributes) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into IncidentFieldAttributesMultipleValue + err = json.Unmarshal(data, &dst.IncidentFieldAttributesMultipleValue) + if err == nil { + jsonIncidentFieldAttributesMultipleValue, _ := json.Marshal(dst.IncidentFieldAttributesMultipleValue) + if string(jsonIncidentFieldAttributesMultipleValue) == "{}" { // empty struct + dst.IncidentFieldAttributesMultipleValue = nil + } else { + match++ + } + } else { + dst.IncidentFieldAttributesMultipleValue = nil + } + + // try to unmarshal data into IncidentFieldAttributesSingleValue + err = json.Unmarshal(data, &dst.IncidentFieldAttributesSingleValue) + if err == nil { + jsonIncidentFieldAttributesSingleValue, _ := json.Marshal(dst.IncidentFieldAttributesSingleValue) + if string(jsonIncidentFieldAttributesSingleValue) == "{}" { // empty struct + dst.IncidentFieldAttributesSingleValue = nil + } else { + match++ + } + } else { + dst.IncidentFieldAttributesSingleValue = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.IncidentFieldAttributesMultipleValue = nil + dst.IncidentFieldAttributesSingleValue = nil + + return fmt.Errorf("Data matches more than one schema in oneOf(IncidentFieldAttributes)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("Data failed to match schemas in oneOf(IncidentFieldAttributes)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src IncidentFieldAttributes) MarshalJSON() ([]byte, error) { + if src.IncidentFieldAttributesMultipleValue != nil { + return json.Marshal(&src.IncidentFieldAttributesMultipleValue) + } + + if src.IncidentFieldAttributesSingleValue != nil { + return json.Marshal(&src.IncidentFieldAttributesSingleValue) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *IncidentFieldAttributes) GetActualInstance() interface{} { + if obj.IncidentFieldAttributesMultipleValue != nil { + return obj.IncidentFieldAttributesMultipleValue + } + + if obj.IncidentFieldAttributesSingleValue != nil { + return obj.IncidentFieldAttributesSingleValue + } + + // all schemas are nil + return nil +} + +type NullableIncidentFieldAttributes struct { + value *IncidentFieldAttributes + isSet bool +} + +func (v NullableIncidentFieldAttributes) Get() *IncidentFieldAttributes { + return v.value +} + +func (v *NullableIncidentFieldAttributes) Set(val *IncidentFieldAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentFieldAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentFieldAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentFieldAttributes(val *IncidentFieldAttributes) *NullableIncidentFieldAttributes { + return &NullableIncidentFieldAttributes{value: val, isSet: true} +} + +func (v NullableIncidentFieldAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentFieldAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_field_attributes_multiple_value.go b/api/v2/datadog/model_incident_field_attributes_multiple_value.go new file mode 100644 index 00000000000..cbb39aa49e4 --- /dev/null +++ b/api/v2/datadog/model_incident_field_attributes_multiple_value.go @@ -0,0 +1,152 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentFieldAttributesMultipleValue A field with potentially multiple values selected. +type IncidentFieldAttributesMultipleValue struct { + Type *IncidentFieldAttributesValueType `json:"type,omitempty"` + // The multiple values selected for this field. + Value *[]string `json:"value,omitempty"` +} + +// NewIncidentFieldAttributesMultipleValue instantiates a new IncidentFieldAttributesMultipleValue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentFieldAttributesMultipleValue() *IncidentFieldAttributesMultipleValue { + this := IncidentFieldAttributesMultipleValue{} + var type_ IncidentFieldAttributesValueType = "multiselect" + this.Type = &type_ + return &this +} + +// NewIncidentFieldAttributesMultipleValueWithDefaults instantiates a new IncidentFieldAttributesMultipleValue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentFieldAttributesMultipleValueWithDefaults() *IncidentFieldAttributesMultipleValue { + this := IncidentFieldAttributesMultipleValue{} + var type_ IncidentFieldAttributesValueType = "multiselect" + this.Type = &type_ + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IncidentFieldAttributesMultipleValue) GetType() IncidentFieldAttributesValueType { + if o == nil || o.Type == nil { + var ret IncidentFieldAttributesValueType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentFieldAttributesMultipleValue) GetTypeOk() (*IncidentFieldAttributesValueType, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IncidentFieldAttributesMultipleValue) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given IncidentFieldAttributesValueType and assigns it to the Type field. +func (o *IncidentFieldAttributesMultipleValue) SetType(v IncidentFieldAttributesValueType) { + o.Type = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *IncidentFieldAttributesMultipleValue) GetValue() []string { + if o == nil || o.Value == nil { + var ret []string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentFieldAttributesMultipleValue) GetValueOk() (*[]string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *IncidentFieldAttributesMultipleValue) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given []string and assigns it to the Value field. +func (o *IncidentFieldAttributesMultipleValue) SetValue(v []string) { + o.Value = &v +} + +func (o IncidentFieldAttributesMultipleValue) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableIncidentFieldAttributesMultipleValue struct { + value *IncidentFieldAttributesMultipleValue + isSet bool +} + +func (v NullableIncidentFieldAttributesMultipleValue) Get() *IncidentFieldAttributesMultipleValue { + return v.value +} + +func (v *NullableIncidentFieldAttributesMultipleValue) Set(val *IncidentFieldAttributesMultipleValue) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentFieldAttributesMultipleValue) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentFieldAttributesMultipleValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentFieldAttributesMultipleValue(val *IncidentFieldAttributesMultipleValue) *NullableIncidentFieldAttributesMultipleValue { + return &NullableIncidentFieldAttributesMultipleValue{value: val, isSet: true} +} + +func (v NullableIncidentFieldAttributesMultipleValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentFieldAttributesMultipleValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_field_attributes_single_value.go b/api/v2/datadog/model_incident_field_attributes_single_value.go new file mode 100644 index 00000000000..174d4628cd1 --- /dev/null +++ b/api/v2/datadog/model_incident_field_attributes_single_value.go @@ -0,0 +1,152 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentFieldAttributesSingleValue A field with a single value selected. +type IncidentFieldAttributesSingleValue struct { + Type *IncidentFieldAttributesSingleValueType `json:"type,omitempty"` + // The single value selected for this field. + Value *string `json:"value,omitempty"` +} + +// NewIncidentFieldAttributesSingleValue instantiates a new IncidentFieldAttributesSingleValue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentFieldAttributesSingleValue() *IncidentFieldAttributesSingleValue { + this := IncidentFieldAttributesSingleValue{} + var type_ IncidentFieldAttributesSingleValueType = "dropdown" + this.Type = &type_ + return &this +} + +// NewIncidentFieldAttributesSingleValueWithDefaults instantiates a new IncidentFieldAttributesSingleValue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentFieldAttributesSingleValueWithDefaults() *IncidentFieldAttributesSingleValue { + this := IncidentFieldAttributesSingleValue{} + var type_ IncidentFieldAttributesSingleValueType = "dropdown" + this.Type = &type_ + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IncidentFieldAttributesSingleValue) GetType() IncidentFieldAttributesSingleValueType { + if o == nil || o.Type == nil { + var ret IncidentFieldAttributesSingleValueType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentFieldAttributesSingleValue) GetTypeOk() (*IncidentFieldAttributesSingleValueType, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IncidentFieldAttributesSingleValue) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given IncidentFieldAttributesSingleValueType and assigns it to the Type field. +func (o *IncidentFieldAttributesSingleValue) SetType(v IncidentFieldAttributesSingleValueType) { + o.Type = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *IncidentFieldAttributesSingleValue) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentFieldAttributesSingleValue) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *IncidentFieldAttributesSingleValue) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *IncidentFieldAttributesSingleValue) SetValue(v string) { + o.Value = &v +} + +func (o IncidentFieldAttributesSingleValue) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableIncidentFieldAttributesSingleValue struct { + value *IncidentFieldAttributesSingleValue + isSet bool +} + +func (v NullableIncidentFieldAttributesSingleValue) Get() *IncidentFieldAttributesSingleValue { + return v.value +} + +func (v *NullableIncidentFieldAttributesSingleValue) Set(val *IncidentFieldAttributesSingleValue) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentFieldAttributesSingleValue) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentFieldAttributesSingleValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentFieldAttributesSingleValue(val *IncidentFieldAttributesSingleValue) *NullableIncidentFieldAttributesSingleValue { + return &NullableIncidentFieldAttributesSingleValue{value: val, isSet: true} +} + +func (v NullableIncidentFieldAttributesSingleValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentFieldAttributesSingleValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_field_attributes_single_value_type.go b/api/v2/datadog/model_incident_field_attributes_single_value_type.go new file mode 100644 index 00000000000..2925fd03326 --- /dev/null +++ b/api/v2/datadog/model_incident_field_attributes_single_value_type.go @@ -0,0 +1,81 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentFieldAttributesSingleValueType Type of the single value field definitions. +type IncidentFieldAttributesSingleValueType string + +// List of IncidentFieldAttributesSingleValueType +const ( + INCIDENTFIELDATTRIBUTESSINGLEVALUETYPE_DROPDOWN IncidentFieldAttributesSingleValueType = "dropdown" + INCIDENTFIELDATTRIBUTESSINGLEVALUETYPE_TEXTBOX IncidentFieldAttributesSingleValueType = "textbox" +) + +func (v *IncidentFieldAttributesSingleValueType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := IncidentFieldAttributesSingleValueType(value) + for _, existing := range []IncidentFieldAttributesSingleValueType{"dropdown", "textbox"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid IncidentFieldAttributesSingleValueType", value) +} + +// Ptr returns reference to IncidentFieldAttributesSingleValueType value +func (v IncidentFieldAttributesSingleValueType) Ptr() *IncidentFieldAttributesSingleValueType { + return &v +} + +type NullableIncidentFieldAttributesSingleValueType struct { + value *IncidentFieldAttributesSingleValueType + isSet bool +} + +func (v NullableIncidentFieldAttributesSingleValueType) Get() *IncidentFieldAttributesSingleValueType { + return v.value +} + +func (v *NullableIncidentFieldAttributesSingleValueType) Set(val *IncidentFieldAttributesSingleValueType) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentFieldAttributesSingleValueType) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentFieldAttributesSingleValueType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentFieldAttributesSingleValueType(val *IncidentFieldAttributesSingleValueType) *NullableIncidentFieldAttributesSingleValueType { + return &NullableIncidentFieldAttributesSingleValueType{value: val, isSet: true} +} + +func (v NullableIncidentFieldAttributesSingleValueType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentFieldAttributesSingleValueType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_field_attributes_value_type.go b/api/v2/datadog/model_incident_field_attributes_value_type.go new file mode 100644 index 00000000000..aa6d3fa31df --- /dev/null +++ b/api/v2/datadog/model_incident_field_attributes_value_type.go @@ -0,0 +1,83 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentFieldAttributesValueType Type of the single value field definitions. +type IncidentFieldAttributesValueType string + +// List of IncidentFieldAttributesValueType +const ( + INCIDENTFIELDATTRIBUTESVALUETYPE_MULTISELECT IncidentFieldAttributesValueType = "multiselect" + INCIDENTFIELDATTRIBUTESVALUETYPE_TEXTARRAY IncidentFieldAttributesValueType = "textarray" + INCIDENTFIELDATTRIBUTESVALUETYPE_METRICTAG IncidentFieldAttributesValueType = "metrictag" + INCIDENTFIELDATTRIBUTESVALUETYPE_AUTOCOMPLETE IncidentFieldAttributesValueType = "autocomplete" +) + +func (v *IncidentFieldAttributesValueType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := IncidentFieldAttributesValueType(value) + for _, existing := range []IncidentFieldAttributesValueType{"multiselect", "textarray", "metrictag", "autocomplete"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid IncidentFieldAttributesValueType", value) +} + +// Ptr returns reference to IncidentFieldAttributesValueType value +func (v IncidentFieldAttributesValueType) Ptr() *IncidentFieldAttributesValueType { + return &v +} + +type NullableIncidentFieldAttributesValueType struct { + value *IncidentFieldAttributesValueType + isSet bool +} + +func (v NullableIncidentFieldAttributesValueType) Get() *IncidentFieldAttributesValueType { + return v.value +} + +func (v *NullableIncidentFieldAttributesValueType) Set(val *IncidentFieldAttributesValueType) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentFieldAttributesValueType) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentFieldAttributesValueType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentFieldAttributesValueType(val *IncidentFieldAttributesValueType) *NullableIncidentFieldAttributesValueType { + return &NullableIncidentFieldAttributesValueType{value: val, isSet: true} +} + +func (v NullableIncidentFieldAttributesValueType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentFieldAttributesValueType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_integration_metadata_type.go b/api/v2/datadog/model_incident_integration_metadata_type.go new file mode 100644 index 00000000000..022a0589d90 --- /dev/null +++ b/api/v2/datadog/model_incident_integration_metadata_type.go @@ -0,0 +1,80 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentIntegrationMetadataType Integration metadata resource type. +type IncidentIntegrationMetadataType string + +// List of IncidentIntegrationMetadataType +const ( + INCIDENTINTEGRATIONMETADATATYPE_INCIDENT_INTEGRATION_METADATA IncidentIntegrationMetadataType = "incident_integration_metadata" +) + +func (v *IncidentIntegrationMetadataType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := IncidentIntegrationMetadataType(value) + for _, existing := range []IncidentIntegrationMetadataType{"incident_integration_metadata"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid IncidentIntegrationMetadataType", value) +} + +// Ptr returns reference to IncidentIntegrationMetadataType value +func (v IncidentIntegrationMetadataType) Ptr() *IncidentIntegrationMetadataType { + return &v +} + +type NullableIncidentIntegrationMetadataType struct { + value *IncidentIntegrationMetadataType + isSet bool +} + +func (v NullableIncidentIntegrationMetadataType) Get() *IncidentIntegrationMetadataType { + return v.value +} + +func (v *NullableIncidentIntegrationMetadataType) Set(val *IncidentIntegrationMetadataType) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentIntegrationMetadataType) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentIntegrationMetadataType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentIntegrationMetadataType(val *IncidentIntegrationMetadataType) *NullableIncidentIntegrationMetadataType { + return &NullableIncidentIntegrationMetadataType{value: val, isSet: true} +} + +func (v NullableIncidentIntegrationMetadataType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentIntegrationMetadataType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_postmortem_type.go b/api/v2/datadog/model_incident_postmortem_type.go new file mode 100644 index 00000000000..deba20f66e3 --- /dev/null +++ b/api/v2/datadog/model_incident_postmortem_type.go @@ -0,0 +1,80 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentPostmortemType Incident postmortem resource type. +type IncidentPostmortemType string + +// List of IncidentPostmortemType +const ( + INCIDENTPOSTMORTEMTYPE_INCIDENT_POSTMORTEMS IncidentPostmortemType = "incident_postmortems" +) + +func (v *IncidentPostmortemType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := IncidentPostmortemType(value) + for _, existing := range []IncidentPostmortemType{"incident_postmortems"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid IncidentPostmortemType", value) +} + +// Ptr returns reference to IncidentPostmortemType value +func (v IncidentPostmortemType) Ptr() *IncidentPostmortemType { + return &v +} + +type NullableIncidentPostmortemType struct { + value *IncidentPostmortemType + isSet bool +} + +func (v NullableIncidentPostmortemType) Get() *IncidentPostmortemType { + return v.value +} + +func (v *NullableIncidentPostmortemType) Set(val *IncidentPostmortemType) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentPostmortemType) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentPostmortemType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentPostmortemType(val *IncidentPostmortemType) *NullableIncidentPostmortemType { + return &NullableIncidentPostmortemType{value: val, isSet: true} +} + +func (v NullableIncidentPostmortemType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentPostmortemType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_response.go b/api/v2/datadog/model_incident_response.go new file mode 100644 index 00000000000..ba88a48b855 --- /dev/null +++ b/api/v2/datadog/model_incident_response.go @@ -0,0 +1,141 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentResponse Response with an incident. +type IncidentResponse struct { + Data IncidentResponseData `json:"data"` + // Included related resources that the user requested. + Included *[]IncidentResponseIncludedItem `json:"included,omitempty"` +} + +// NewIncidentResponse instantiates a new IncidentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentResponse(data IncidentResponseData) *IncidentResponse { + this := IncidentResponse{} + this.Data = data + return &this +} + +// NewIncidentResponseWithDefaults instantiates a new IncidentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentResponseWithDefaults() *IncidentResponse { + this := IncidentResponse{} + return &this +} + +// GetData returns the Data field value +func (o *IncidentResponse) GetData() IncidentResponseData { + if o == nil { + var ret IncidentResponseData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *IncidentResponse) GetDataOk() (*IncidentResponseData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *IncidentResponse) SetData(v IncidentResponseData) { + o.Data = v +} + +// GetIncluded returns the Included field value if set, zero value otherwise. +func (o *IncidentResponse) GetIncluded() []IncidentResponseIncludedItem { + if o == nil || o.Included == nil { + var ret []IncidentResponseIncludedItem + return ret + } + return *o.Included +} + +// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponse) GetIncludedOk() (*[]IncidentResponseIncludedItem, bool) { + if o == nil || o.Included == nil { + return nil, false + } + return o.Included, true +} + +// HasIncluded returns a boolean if a field has been set. +func (o *IncidentResponse) HasIncluded() bool { + if o != nil && o.Included != nil { + return true + } + + return false +} + +// SetIncluded gets a reference to the given []IncidentResponseIncludedItem and assigns it to the Included field. +func (o *IncidentResponse) SetIncluded(v []IncidentResponseIncludedItem) { + o.Included = &v +} + +func (o IncidentResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["data"] = o.Data + } + if o.Included != nil { + toSerialize["included"] = o.Included + } + return json.Marshal(toSerialize) +} + +type NullableIncidentResponse struct { + value *IncidentResponse + isSet bool +} + +func (v NullableIncidentResponse) Get() *IncidentResponse { + return v.value +} + +func (v *NullableIncidentResponse) Set(val *IncidentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentResponse(val *IncidentResponse) *NullableIncidentResponse { + return &NullableIncidentResponse{value: val, isSet: true} +} + +func (v NullableIncidentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_response_attributes.go b/api/v2/datadog/model_incident_response_attributes.go new file mode 100644 index 00000000000..12c9e0cdf9b --- /dev/null +++ b/api/v2/datadog/model_incident_response_attributes.go @@ -0,0 +1,790 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "time" +) + +// IncidentResponseAttributes The incident's attributes from a response. +type IncidentResponseAttributes struct { + // Timestamp when the incident was created. + Created *time.Time `json:"created,omitempty"` + // Length of the incident's customer impact in seconds. Equals the difference between `customer_impact_start` and `customer_impact_end`. + CustomerImpactDuration *int64 `json:"customer_impact_duration,omitempty"` + // Timestamp when customers were no longer impacted by the incident. + CustomerImpactEnd NullableTime `json:"customer_impact_end,omitempty"` + // A summary of the impact customers experienced during the incident. + CustomerImpactScope NullableString `json:"customer_impact_scope,omitempty"` + // Timestamp when customers began being impacted by the incident. + CustomerImpactStart NullableTime `json:"customer_impact_start,omitempty"` + // A flag indicating whether the incident caused customer impact. + CustomerImpacted *bool `json:"customer_impacted,omitempty"` + // Timestamp when the incident was detected. + Detected NullableTime `json:"detected,omitempty"` + // A condensed view of the user-defined fields attached to incidents. + Fields *map[string]IncidentFieldAttributes `json:"fields,omitempty"` + // Timestamp when the incident was last modified. + Modified *time.Time `json:"modified,omitempty"` + // Notification handles that will be notified of the incident during update. + NotificationHandles *[]string `json:"notification_handles,omitempty"` + // The UUID of the postmortem object attached to the incident. + PostmortemId *string `json:"postmortem_id,omitempty"` + // The monotonically increasing integer ID for the incident. + PublicId *int64 `json:"public_id,omitempty"` + // Timestamp when the incident's state was set to resolved. + Resolved NullableTime `json:"resolved,omitempty"` + // The amount of time in seconds to detect the incident. Equals the difference between `customer_impact_start` and `detected`. + TimeToDetect *int64 `json:"time_to_detect,omitempty"` + // The amount of time in seconds to call incident after detection. Equals the difference of `detected` and `created`. + TimeToInternalResponse *int64 `json:"time_to_internal_response,omitempty"` + // The amount of time in seconds to resolve customer impact after detecting the issue. Equals the difference between `customer_impact_end` and `detected`. + TimeToRepair *int64 `json:"time_to_repair,omitempty"` + // The amount of time in seconds to resolve the incident after it was created. Equals the difference between `created` and `resolved`. + TimeToResolve *int64 `json:"time_to_resolve,omitempty"` + // The title of the incident, which summarizes what happened. + Title string `json:"title"` +} + +// NewIncidentResponseAttributes instantiates a new IncidentResponseAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentResponseAttributes(title string) *IncidentResponseAttributes { + this := IncidentResponseAttributes{} + this.Title = title + return &this +} + +// NewIncidentResponseAttributesWithDefaults instantiates a new IncidentResponseAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentResponseAttributesWithDefaults() *IncidentResponseAttributes { + this := IncidentResponseAttributes{} + return &this +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetCreated() time.Time { + if o == nil || o.Created == nil { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetCreatedOk() (*time.Time, bool) { + if o == nil || o.Created == nil { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasCreated() bool { + if o != nil && o.Created != nil { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IncidentResponseAttributes) SetCreated(v time.Time) { + o.Created = &v +} + +// GetCustomerImpactDuration returns the CustomerImpactDuration field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetCustomerImpactDuration() int64 { + if o == nil || o.CustomerImpactDuration == nil { + var ret int64 + return ret + } + return *o.CustomerImpactDuration +} + +// GetCustomerImpactDurationOk returns a tuple with the CustomerImpactDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetCustomerImpactDurationOk() (*int64, bool) { + if o == nil || o.CustomerImpactDuration == nil { + return nil, false + } + return o.CustomerImpactDuration, true +} + +// HasCustomerImpactDuration returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasCustomerImpactDuration() bool { + if o != nil && o.CustomerImpactDuration != nil { + return true + } + + return false +} + +// SetCustomerImpactDuration gets a reference to the given int64 and assigns it to the CustomerImpactDuration field. +func (o *IncidentResponseAttributes) SetCustomerImpactDuration(v int64) { + o.CustomerImpactDuration = &v +} + +// GetCustomerImpactEnd returns the CustomerImpactEnd field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentResponseAttributes) GetCustomerImpactEnd() time.Time { + if o == nil || o.CustomerImpactEnd.Get() == nil { + var ret time.Time + return ret + } + return *o.CustomerImpactEnd.Get() +} + +// GetCustomerImpactEndOk returns a tuple with the CustomerImpactEnd field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentResponseAttributes) GetCustomerImpactEndOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CustomerImpactEnd.Get(), o.CustomerImpactEnd.IsSet() +} + +// HasCustomerImpactEnd returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasCustomerImpactEnd() bool { + if o != nil && o.CustomerImpactEnd.IsSet() { + return true + } + + return false +} + +// SetCustomerImpactEnd gets a reference to the given NullableTime and assigns it to the CustomerImpactEnd field. +func (o *IncidentResponseAttributes) SetCustomerImpactEnd(v time.Time) { + o.CustomerImpactEnd.Set(&v) +} + +// SetCustomerImpactEndNil sets the value for CustomerImpactEnd to be an explicit nil +func (o *IncidentResponseAttributes) SetCustomerImpactEndNil() { + o.CustomerImpactEnd.Set(nil) +} + +// UnsetCustomerImpactEnd ensures that no value is present for CustomerImpactEnd, not even an explicit nil +func (o *IncidentResponseAttributes) UnsetCustomerImpactEnd() { + o.CustomerImpactEnd.Unset() +} + +// GetCustomerImpactScope returns the CustomerImpactScope field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentResponseAttributes) GetCustomerImpactScope() string { + if o == nil || o.CustomerImpactScope.Get() == nil { + var ret string + return ret + } + return *o.CustomerImpactScope.Get() +} + +// GetCustomerImpactScopeOk returns a tuple with the CustomerImpactScope field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentResponseAttributes) GetCustomerImpactScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomerImpactScope.Get(), o.CustomerImpactScope.IsSet() +} + +// HasCustomerImpactScope returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasCustomerImpactScope() bool { + if o != nil && o.CustomerImpactScope.IsSet() { + return true + } + + return false +} + +// SetCustomerImpactScope gets a reference to the given NullableString and assigns it to the CustomerImpactScope field. +func (o *IncidentResponseAttributes) SetCustomerImpactScope(v string) { + o.CustomerImpactScope.Set(&v) +} + +// SetCustomerImpactScopeNil sets the value for CustomerImpactScope to be an explicit nil +func (o *IncidentResponseAttributes) SetCustomerImpactScopeNil() { + o.CustomerImpactScope.Set(nil) +} + +// UnsetCustomerImpactScope ensures that no value is present for CustomerImpactScope, not even an explicit nil +func (o *IncidentResponseAttributes) UnsetCustomerImpactScope() { + o.CustomerImpactScope.Unset() +} + +// GetCustomerImpactStart returns the CustomerImpactStart field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentResponseAttributes) GetCustomerImpactStart() time.Time { + if o == nil || o.CustomerImpactStart.Get() == nil { + var ret time.Time + return ret + } + return *o.CustomerImpactStart.Get() +} + +// GetCustomerImpactStartOk returns a tuple with the CustomerImpactStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentResponseAttributes) GetCustomerImpactStartOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CustomerImpactStart.Get(), o.CustomerImpactStart.IsSet() +} + +// HasCustomerImpactStart returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasCustomerImpactStart() bool { + if o != nil && o.CustomerImpactStart.IsSet() { + return true + } + + return false +} + +// SetCustomerImpactStart gets a reference to the given NullableTime and assigns it to the CustomerImpactStart field. +func (o *IncidentResponseAttributes) SetCustomerImpactStart(v time.Time) { + o.CustomerImpactStart.Set(&v) +} + +// SetCustomerImpactStartNil sets the value for CustomerImpactStart to be an explicit nil +func (o *IncidentResponseAttributes) SetCustomerImpactStartNil() { + o.CustomerImpactStart.Set(nil) +} + +// UnsetCustomerImpactStart ensures that no value is present for CustomerImpactStart, not even an explicit nil +func (o *IncidentResponseAttributes) UnsetCustomerImpactStart() { + o.CustomerImpactStart.Unset() +} + +// GetCustomerImpacted returns the CustomerImpacted field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetCustomerImpacted() bool { + if o == nil || o.CustomerImpacted == nil { + var ret bool + return ret + } + return *o.CustomerImpacted +} + +// GetCustomerImpactedOk returns a tuple with the CustomerImpacted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetCustomerImpactedOk() (*bool, bool) { + if o == nil || o.CustomerImpacted == nil { + return nil, false + } + return o.CustomerImpacted, true +} + +// HasCustomerImpacted returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasCustomerImpacted() bool { + if o != nil && o.CustomerImpacted != nil { + return true + } + + return false +} + +// SetCustomerImpacted gets a reference to the given bool and assigns it to the CustomerImpacted field. +func (o *IncidentResponseAttributes) SetCustomerImpacted(v bool) { + o.CustomerImpacted = &v +} + +// GetDetected returns the Detected field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentResponseAttributes) GetDetected() time.Time { + if o == nil || o.Detected.Get() == nil { + var ret time.Time + return ret + } + return *o.Detected.Get() +} + +// GetDetectedOk returns a tuple with the Detected field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentResponseAttributes) GetDetectedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Detected.Get(), o.Detected.IsSet() +} + +// HasDetected returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasDetected() bool { + if o != nil && o.Detected.IsSet() { + return true + } + + return false +} + +// SetDetected gets a reference to the given NullableTime and assigns it to the Detected field. +func (o *IncidentResponseAttributes) SetDetected(v time.Time) { + o.Detected.Set(&v) +} + +// SetDetectedNil sets the value for Detected to be an explicit nil +func (o *IncidentResponseAttributes) SetDetectedNil() { + o.Detected.Set(nil) +} + +// UnsetDetected ensures that no value is present for Detected, not even an explicit nil +func (o *IncidentResponseAttributes) UnsetDetected() { + o.Detected.Unset() +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetFields() map[string]IncidentFieldAttributes { + if o == nil || o.Fields == nil { + var ret map[string]IncidentFieldAttributes + return ret + } + return *o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetFieldsOk() (*map[string]IncidentFieldAttributes, bool) { + if o == nil || o.Fields == nil { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasFields() bool { + if o != nil && o.Fields != nil { + return true + } + + return false +} + +// SetFields gets a reference to the given map[string]IncidentFieldAttributes and assigns it to the Fields field. +func (o *IncidentResponseAttributes) SetFields(v map[string]IncidentFieldAttributes) { + o.Fields = &v +} + +// GetModified returns the Modified field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetModified() time.Time { + if o == nil || o.Modified == nil { + var ret time.Time + return ret + } + return *o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetModifiedOk() (*time.Time, bool) { + if o == nil || o.Modified == nil { + return nil, false + } + return o.Modified, true +} + +// HasModified returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasModified() bool { + if o != nil && o.Modified != nil { + return true + } + + return false +} + +// SetModified gets a reference to the given time.Time and assigns it to the Modified field. +func (o *IncidentResponseAttributes) SetModified(v time.Time) { + o.Modified = &v +} + +// GetNotificationHandles returns the NotificationHandles field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetNotificationHandles() []string { + if o == nil || o.NotificationHandles == nil { + var ret []string + return ret + } + return *o.NotificationHandles +} + +// GetNotificationHandlesOk returns a tuple with the NotificationHandles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetNotificationHandlesOk() (*[]string, bool) { + if o == nil || o.NotificationHandles == nil { + return nil, false + } + return o.NotificationHandles, true +} + +// HasNotificationHandles returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasNotificationHandles() bool { + if o != nil && o.NotificationHandles != nil { + return true + } + + return false +} + +// SetNotificationHandles gets a reference to the given []string and assigns it to the NotificationHandles field. +func (o *IncidentResponseAttributes) SetNotificationHandles(v []string) { + o.NotificationHandles = &v +} + +// GetPostmortemId returns the PostmortemId field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetPostmortemId() string { + if o == nil || o.PostmortemId == nil { + var ret string + return ret + } + return *o.PostmortemId +} + +// GetPostmortemIdOk returns a tuple with the PostmortemId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetPostmortemIdOk() (*string, bool) { + if o == nil || o.PostmortemId == nil { + return nil, false + } + return o.PostmortemId, true +} + +// HasPostmortemId returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasPostmortemId() bool { + if o != nil && o.PostmortemId != nil { + return true + } + + return false +} + +// SetPostmortemId gets a reference to the given string and assigns it to the PostmortemId field. +func (o *IncidentResponseAttributes) SetPostmortemId(v string) { + o.PostmortemId = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetPublicId() int64 { + if o == nil || o.PublicId == nil { + var ret int64 + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetPublicIdOk() (*int64, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasPublicId() bool { + if o != nil && o.PublicId != nil { + return true + } + + return false +} + +// SetPublicId gets a reference to the given int64 and assigns it to the PublicId field. +func (o *IncidentResponseAttributes) SetPublicId(v int64) { + o.PublicId = &v +} + +// GetResolved returns the Resolved field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentResponseAttributes) GetResolved() time.Time { + if o == nil || o.Resolved.Get() == nil { + var ret time.Time + return ret + } + return *o.Resolved.Get() +} + +// GetResolvedOk returns a tuple with the Resolved field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentResponseAttributes) GetResolvedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Resolved.Get(), o.Resolved.IsSet() +} + +// HasResolved returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasResolved() bool { + if o != nil && o.Resolved.IsSet() { + return true + } + + return false +} + +// SetResolved gets a reference to the given NullableTime and assigns it to the Resolved field. +func (o *IncidentResponseAttributes) SetResolved(v time.Time) { + o.Resolved.Set(&v) +} + +// SetResolvedNil sets the value for Resolved to be an explicit nil +func (o *IncidentResponseAttributes) SetResolvedNil() { + o.Resolved.Set(nil) +} + +// UnsetResolved ensures that no value is present for Resolved, not even an explicit nil +func (o *IncidentResponseAttributes) UnsetResolved() { + o.Resolved.Unset() +} + +// GetTimeToDetect returns the TimeToDetect field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetTimeToDetect() int64 { + if o == nil || o.TimeToDetect == nil { + var ret int64 + return ret + } + return *o.TimeToDetect +} + +// GetTimeToDetectOk returns a tuple with the TimeToDetect field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetTimeToDetectOk() (*int64, bool) { + if o == nil || o.TimeToDetect == nil { + return nil, false + } + return o.TimeToDetect, true +} + +// HasTimeToDetect returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasTimeToDetect() bool { + if o != nil && o.TimeToDetect != nil { + return true + } + + return false +} + +// SetTimeToDetect gets a reference to the given int64 and assigns it to the TimeToDetect field. +func (o *IncidentResponseAttributes) SetTimeToDetect(v int64) { + o.TimeToDetect = &v +} + +// GetTimeToInternalResponse returns the TimeToInternalResponse field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetTimeToInternalResponse() int64 { + if o == nil || o.TimeToInternalResponse == nil { + var ret int64 + return ret + } + return *o.TimeToInternalResponse +} + +// GetTimeToInternalResponseOk returns a tuple with the TimeToInternalResponse field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetTimeToInternalResponseOk() (*int64, bool) { + if o == nil || o.TimeToInternalResponse == nil { + return nil, false + } + return o.TimeToInternalResponse, true +} + +// HasTimeToInternalResponse returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasTimeToInternalResponse() bool { + if o != nil && o.TimeToInternalResponse != nil { + return true + } + + return false +} + +// SetTimeToInternalResponse gets a reference to the given int64 and assigns it to the TimeToInternalResponse field. +func (o *IncidentResponseAttributes) SetTimeToInternalResponse(v int64) { + o.TimeToInternalResponse = &v +} + +// GetTimeToRepair returns the TimeToRepair field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetTimeToRepair() int64 { + if o == nil || o.TimeToRepair == nil { + var ret int64 + return ret + } + return *o.TimeToRepair +} + +// GetTimeToRepairOk returns a tuple with the TimeToRepair field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetTimeToRepairOk() (*int64, bool) { + if o == nil || o.TimeToRepair == nil { + return nil, false + } + return o.TimeToRepair, true +} + +// HasTimeToRepair returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasTimeToRepair() bool { + if o != nil && o.TimeToRepair != nil { + return true + } + + return false +} + +// SetTimeToRepair gets a reference to the given int64 and assigns it to the TimeToRepair field. +func (o *IncidentResponseAttributes) SetTimeToRepair(v int64) { + o.TimeToRepair = &v +} + +// GetTimeToResolve returns the TimeToResolve field value if set, zero value otherwise. +func (o *IncidentResponseAttributes) GetTimeToResolve() int64 { + if o == nil || o.TimeToResolve == nil { + var ret int64 + return ret + } + return *o.TimeToResolve +} + +// GetTimeToResolveOk returns a tuple with the TimeToResolve field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetTimeToResolveOk() (*int64, bool) { + if o == nil || o.TimeToResolve == nil { + return nil, false + } + return o.TimeToResolve, true +} + +// HasTimeToResolve returns a boolean if a field has been set. +func (o *IncidentResponseAttributes) HasTimeToResolve() bool { + if o != nil && o.TimeToResolve != nil { + return true + } + + return false +} + +// SetTimeToResolve gets a reference to the given int64 and assigns it to the TimeToResolve field. +func (o *IncidentResponseAttributes) SetTimeToResolve(v int64) { + o.TimeToResolve = &v +} + +// GetTitle returns the Title field value +func (o *IncidentResponseAttributes) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *IncidentResponseAttributes) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *IncidentResponseAttributes) SetTitle(v string) { + o.Title = v +} + +func (o IncidentResponseAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Created != nil { + toSerialize["created"] = o.Created + } + if o.CustomerImpactDuration != nil { + toSerialize["customer_impact_duration"] = o.CustomerImpactDuration + } + if o.CustomerImpactEnd.IsSet() { + toSerialize["customer_impact_end"] = o.CustomerImpactEnd.Get() + } + if o.CustomerImpactScope.IsSet() { + toSerialize["customer_impact_scope"] = o.CustomerImpactScope.Get() + } + if o.CustomerImpactStart.IsSet() { + toSerialize["customer_impact_start"] = o.CustomerImpactStart.Get() + } + if o.CustomerImpacted != nil { + toSerialize["customer_impacted"] = o.CustomerImpacted + } + if o.Detected.IsSet() { + toSerialize["detected"] = o.Detected.Get() + } + if o.Fields != nil { + toSerialize["fields"] = o.Fields + } + if o.Modified != nil { + toSerialize["modified"] = o.Modified + } + if o.NotificationHandles != nil { + toSerialize["notification_handles"] = o.NotificationHandles + } + if o.PostmortemId != nil { + toSerialize["postmortem_id"] = o.PostmortemId + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } + if o.Resolved.IsSet() { + toSerialize["resolved"] = o.Resolved.Get() + } + if o.TimeToDetect != nil { + toSerialize["time_to_detect"] = o.TimeToDetect + } + if o.TimeToInternalResponse != nil { + toSerialize["time_to_internal_response"] = o.TimeToInternalResponse + } + if o.TimeToRepair != nil { + toSerialize["time_to_repair"] = o.TimeToRepair + } + if o.TimeToResolve != nil { + toSerialize["time_to_resolve"] = o.TimeToResolve + } + if true { + toSerialize["title"] = o.Title + } + return json.Marshal(toSerialize) +} + +type NullableIncidentResponseAttributes struct { + value *IncidentResponseAttributes + isSet bool +} + +func (v NullableIncidentResponseAttributes) Get() *IncidentResponseAttributes { + return v.value +} + +func (v *NullableIncidentResponseAttributes) Set(val *IncidentResponseAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentResponseAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentResponseAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentResponseAttributes(val *IncidentResponseAttributes) *NullableIncidentResponseAttributes { + return &NullableIncidentResponseAttributes{value: val, isSet: true} +} + +func (v NullableIncidentResponseAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentResponseAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_response_data.go b/api/v2/datadog/model_incident_response_data.go new file mode 100644 index 00000000000..130319c190f --- /dev/null +++ b/api/v2/datadog/model_incident_response_data.go @@ -0,0 +1,208 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentResponseData Incident data from a response. +type IncidentResponseData struct { + Attributes *IncidentResponseAttributes `json:"attributes,omitempty"` + // The incident's ID. + Id string `json:"id"` + Relationships *IncidentResponseRelationships `json:"relationships,omitempty"` + Type IncidentType `json:"type"` +} + +// NewIncidentResponseData instantiates a new IncidentResponseData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentResponseData(id string, type_ IncidentType) *IncidentResponseData { + this := IncidentResponseData{} + this.Id = id + this.Type = type_ + return &this +} + +// NewIncidentResponseDataWithDefaults instantiates a new IncidentResponseData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentResponseDataWithDefaults() *IncidentResponseData { + this := IncidentResponseData{} + var type_ IncidentType = "incidents" + this.Type = type_ + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *IncidentResponseData) GetAttributes() IncidentResponseAttributes { + if o == nil || o.Attributes == nil { + var ret IncidentResponseAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseData) GetAttributesOk() (*IncidentResponseAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *IncidentResponseData) HasAttributes() bool { + if o != nil && o.Attributes != nil { + return true + } + + return false +} + +// SetAttributes gets a reference to the given IncidentResponseAttributes and assigns it to the Attributes field. +func (o *IncidentResponseData) SetAttributes(v IncidentResponseAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value +func (o *IncidentResponseData) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *IncidentResponseData) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *IncidentResponseData) SetId(v string) { + o.Id = v +} + +// GetRelationships returns the Relationships field value if set, zero value otherwise. +func (o *IncidentResponseData) GetRelationships() IncidentResponseRelationships { + if o == nil || o.Relationships == nil { + var ret IncidentResponseRelationships + return ret + } + return *o.Relationships +} + +// GetRelationshipsOk returns a tuple with the Relationships field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseData) GetRelationshipsOk() (*IncidentResponseRelationships, bool) { + if o == nil || o.Relationships == nil { + return nil, false + } + return o.Relationships, true +} + +// HasRelationships returns a boolean if a field has been set. +func (o *IncidentResponseData) HasRelationships() bool { + if o != nil && o.Relationships != nil { + return true + } + + return false +} + +// SetRelationships gets a reference to the given IncidentResponseRelationships and assigns it to the Relationships field. +func (o *IncidentResponseData) SetRelationships(v IncidentResponseRelationships) { + o.Relationships = &v +} + +// GetType returns the Type field value +func (o *IncidentResponseData) GetType() IncidentType { + if o == nil { + var ret IncidentType + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *IncidentResponseData) GetTypeOk() (*IncidentType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *IncidentResponseData) SetType(v IncidentType) { + o.Type = v +} + +func (o IncidentResponseData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if true { + toSerialize["id"] = o.Id + } + if o.Relationships != nil { + toSerialize["relationships"] = o.Relationships + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableIncidentResponseData struct { + value *IncidentResponseData + isSet bool +} + +func (v NullableIncidentResponseData) Get() *IncidentResponseData { + return v.value +} + +func (v *NullableIncidentResponseData) Set(val *IncidentResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentResponseData(val *IncidentResponseData) *NullableIncidentResponseData { + return &NullableIncidentResponseData{value: val, isSet: true} +} + +func (v NullableIncidentResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_response_included_item.go b/api/v2/datadog/model_incident_response_included_item.go new file mode 100644 index 00000000000..428859b3704 --- /dev/null +++ b/api/v2/datadog/model_incident_response_included_item.go @@ -0,0 +1,108 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentResponseIncludedItem - An object related to an incident that is included in the response. +type IncidentResponseIncludedItem struct { + User *User +} + +// UserAsIncidentResponseIncludedItem is a convenience function that returns User wrapped in IncidentResponseIncludedItem +func UserAsIncidentResponseIncludedItem(v *User) IncidentResponseIncludedItem { + return IncidentResponseIncludedItem{User: v} +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *IncidentResponseIncludedItem) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into User + err = json.Unmarshal(data, &dst.User) + if err == nil { + jsonUser, _ := json.Marshal(dst.User) + if string(jsonUser) == "{}" { // empty struct + dst.User = nil + } else { + match++ + } + } else { + dst.User = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.User = nil + + return fmt.Errorf("Data matches more than one schema in oneOf(IncidentResponseIncludedItem)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("Data failed to match schemas in oneOf(IncidentResponseIncludedItem)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src IncidentResponseIncludedItem) MarshalJSON() ([]byte, error) { + if src.User != nil { + return json.Marshal(&src.User) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *IncidentResponseIncludedItem) GetActualInstance() interface{} { + if obj.User != nil { + return obj.User + } + + // all schemas are nil + return nil +} + +type NullableIncidentResponseIncludedItem struct { + value *IncidentResponseIncludedItem + isSet bool +} + +func (v NullableIncidentResponseIncludedItem) Get() *IncidentResponseIncludedItem { + return v.value +} + +func (v *NullableIncidentResponseIncludedItem) Set(val *IncidentResponseIncludedItem) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentResponseIncludedItem) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentResponseIncludedItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentResponseIncludedItem(val *IncidentResponseIncludedItem) *NullableIncidentResponseIncludedItem { + return &NullableIncidentResponseIncludedItem{value: val, isSet: true} +} + +func (v NullableIncidentResponseIncludedItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentResponseIncludedItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_response_relationships.go b/api/v2/datadog/model_incident_response_relationships.go new file mode 100644 index 00000000000..42c98ed09d2 --- /dev/null +++ b/api/v2/datadog/model_incident_response_relationships.go @@ -0,0 +1,255 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentResponseRelationships The incident's relationships from a response. +type IncidentResponseRelationships struct { + CommanderUser *RelationshipToUser `json:"commander_user,omitempty"` + CreatedByUser *RelationshipToUser `json:"created_by_user,omitempty"` + Integrations *RelationshipToIncidentIntegrationMetadatas `json:"integrations,omitempty"` + LastModifiedByUser *RelationshipToUser `json:"last_modified_by_user,omitempty"` + Postmortem *RelationshipToIncidentPostmortem `json:"postmortem,omitempty"` +} + +// NewIncidentResponseRelationships instantiates a new IncidentResponseRelationships object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentResponseRelationships() *IncidentResponseRelationships { + this := IncidentResponseRelationships{} + return &this +} + +// NewIncidentResponseRelationshipsWithDefaults instantiates a new IncidentResponseRelationships object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentResponseRelationshipsWithDefaults() *IncidentResponseRelationships { + this := IncidentResponseRelationships{} + return &this +} + +// GetCommanderUser returns the CommanderUser field value if set, zero value otherwise. +func (o *IncidentResponseRelationships) GetCommanderUser() RelationshipToUser { + if o == nil || o.CommanderUser == nil { + var ret RelationshipToUser + return ret + } + return *o.CommanderUser +} + +// GetCommanderUserOk returns a tuple with the CommanderUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseRelationships) GetCommanderUserOk() (*RelationshipToUser, bool) { + if o == nil || o.CommanderUser == nil { + return nil, false + } + return o.CommanderUser, true +} + +// HasCommanderUser returns a boolean if a field has been set. +func (o *IncidentResponseRelationships) HasCommanderUser() bool { + if o != nil && o.CommanderUser != nil { + return true + } + + return false +} + +// SetCommanderUser gets a reference to the given RelationshipToUser and assigns it to the CommanderUser field. +func (o *IncidentResponseRelationships) SetCommanderUser(v RelationshipToUser) { + o.CommanderUser = &v +} + +// GetCreatedByUser returns the CreatedByUser field value if set, zero value otherwise. +func (o *IncidentResponseRelationships) GetCreatedByUser() RelationshipToUser { + if o == nil || o.CreatedByUser == nil { + var ret RelationshipToUser + return ret + } + return *o.CreatedByUser +} + +// GetCreatedByUserOk returns a tuple with the CreatedByUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseRelationships) GetCreatedByUserOk() (*RelationshipToUser, bool) { + if o == nil || o.CreatedByUser == nil { + return nil, false + } + return o.CreatedByUser, true +} + +// HasCreatedByUser returns a boolean if a field has been set. +func (o *IncidentResponseRelationships) HasCreatedByUser() bool { + if o != nil && o.CreatedByUser != nil { + return true + } + + return false +} + +// SetCreatedByUser gets a reference to the given RelationshipToUser and assigns it to the CreatedByUser field. +func (o *IncidentResponseRelationships) SetCreatedByUser(v RelationshipToUser) { + o.CreatedByUser = &v +} + +// GetIntegrations returns the Integrations field value if set, zero value otherwise. +func (o *IncidentResponseRelationships) GetIntegrations() RelationshipToIncidentIntegrationMetadatas { + if o == nil || o.Integrations == nil { + var ret RelationshipToIncidentIntegrationMetadatas + return ret + } + return *o.Integrations +} + +// GetIntegrationsOk returns a tuple with the Integrations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseRelationships) GetIntegrationsOk() (*RelationshipToIncidentIntegrationMetadatas, bool) { + if o == nil || o.Integrations == nil { + return nil, false + } + return o.Integrations, true +} + +// HasIntegrations returns a boolean if a field has been set. +func (o *IncidentResponseRelationships) HasIntegrations() bool { + if o != nil && o.Integrations != nil { + return true + } + + return false +} + +// SetIntegrations gets a reference to the given RelationshipToIncidentIntegrationMetadatas and assigns it to the Integrations field. +func (o *IncidentResponseRelationships) SetIntegrations(v RelationshipToIncidentIntegrationMetadatas) { + o.Integrations = &v +} + +// GetLastModifiedByUser returns the LastModifiedByUser field value if set, zero value otherwise. +func (o *IncidentResponseRelationships) GetLastModifiedByUser() RelationshipToUser { + if o == nil || o.LastModifiedByUser == nil { + var ret RelationshipToUser + return ret + } + return *o.LastModifiedByUser +} + +// GetLastModifiedByUserOk returns a tuple with the LastModifiedByUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseRelationships) GetLastModifiedByUserOk() (*RelationshipToUser, bool) { + if o == nil || o.LastModifiedByUser == nil { + return nil, false + } + return o.LastModifiedByUser, true +} + +// HasLastModifiedByUser returns a boolean if a field has been set. +func (o *IncidentResponseRelationships) HasLastModifiedByUser() bool { + if o != nil && o.LastModifiedByUser != nil { + return true + } + + return false +} + +// SetLastModifiedByUser gets a reference to the given RelationshipToUser and assigns it to the LastModifiedByUser field. +func (o *IncidentResponseRelationships) SetLastModifiedByUser(v RelationshipToUser) { + o.LastModifiedByUser = &v +} + +// GetPostmortem returns the Postmortem field value if set, zero value otherwise. +func (o *IncidentResponseRelationships) GetPostmortem() RelationshipToIncidentPostmortem { + if o == nil || o.Postmortem == nil { + var ret RelationshipToIncidentPostmortem + return ret + } + return *o.Postmortem +} + +// GetPostmortemOk returns a tuple with the Postmortem field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentResponseRelationships) GetPostmortemOk() (*RelationshipToIncidentPostmortem, bool) { + if o == nil || o.Postmortem == nil { + return nil, false + } + return o.Postmortem, true +} + +// HasPostmortem returns a boolean if a field has been set. +func (o *IncidentResponseRelationships) HasPostmortem() bool { + if o != nil && o.Postmortem != nil { + return true + } + + return false +} + +// SetPostmortem gets a reference to the given RelationshipToIncidentPostmortem and assigns it to the Postmortem field. +func (o *IncidentResponseRelationships) SetPostmortem(v RelationshipToIncidentPostmortem) { + o.Postmortem = &v +} + +func (o IncidentResponseRelationships) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CommanderUser != nil { + toSerialize["commander_user"] = o.CommanderUser + } + if o.CreatedByUser != nil { + toSerialize["created_by_user"] = o.CreatedByUser + } + if o.Integrations != nil { + toSerialize["integrations"] = o.Integrations + } + if o.LastModifiedByUser != nil { + toSerialize["last_modified_by_user"] = o.LastModifiedByUser + } + if o.Postmortem != nil { + toSerialize["postmortem"] = o.Postmortem + } + return json.Marshal(toSerialize) +} + +type NullableIncidentResponseRelationships struct { + value *IncidentResponseRelationships + isSet bool +} + +func (v NullableIncidentResponseRelationships) Get() *IncidentResponseRelationships { + return v.value +} + +func (v *NullableIncidentResponseRelationships) Set(val *IncidentResponseRelationships) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentResponseRelationships) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentResponseRelationships) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentResponseRelationships(val *IncidentResponseRelationships) *NullableIncidentResponseRelationships { + return &NullableIncidentResponseRelationships{value: val, isSet: true} +} + +func (v NullableIncidentResponseRelationships) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentResponseRelationships) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_timeline_cell_create_attributes.go b/api/v2/datadog/model_incident_timeline_cell_create_attributes.go new file mode 100644 index 00000000000..cacdf611216 --- /dev/null +++ b/api/v2/datadog/model_incident_timeline_cell_create_attributes.go @@ -0,0 +1,108 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentTimelineCellCreateAttributes - The timeline cell's attributes for a create request. +type IncidentTimelineCellCreateAttributes struct { + IncidentTimelineCellMarkdownCreateAttributes *IncidentTimelineCellMarkdownCreateAttributes +} + +// IncidentTimelineCellMarkdownCreateAttributesAsIncidentTimelineCellCreateAttributes is a convenience function that returns IncidentTimelineCellMarkdownCreateAttributes wrapped in IncidentTimelineCellCreateAttributes +func IncidentTimelineCellMarkdownCreateAttributesAsIncidentTimelineCellCreateAttributes(v *IncidentTimelineCellMarkdownCreateAttributes) IncidentTimelineCellCreateAttributes { + return IncidentTimelineCellCreateAttributes{IncidentTimelineCellMarkdownCreateAttributes: v} +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *IncidentTimelineCellCreateAttributes) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into IncidentTimelineCellMarkdownCreateAttributes + err = json.Unmarshal(data, &dst.IncidentTimelineCellMarkdownCreateAttributes) + if err == nil { + jsonIncidentTimelineCellMarkdownCreateAttributes, _ := json.Marshal(dst.IncidentTimelineCellMarkdownCreateAttributes) + if string(jsonIncidentTimelineCellMarkdownCreateAttributes) == "{}" { // empty struct + dst.IncidentTimelineCellMarkdownCreateAttributes = nil + } else { + match++ + } + } else { + dst.IncidentTimelineCellMarkdownCreateAttributes = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.IncidentTimelineCellMarkdownCreateAttributes = nil + + return fmt.Errorf("Data matches more than one schema in oneOf(IncidentTimelineCellCreateAttributes)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("Data failed to match schemas in oneOf(IncidentTimelineCellCreateAttributes)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src IncidentTimelineCellCreateAttributes) MarshalJSON() ([]byte, error) { + if src.IncidentTimelineCellMarkdownCreateAttributes != nil { + return json.Marshal(&src.IncidentTimelineCellMarkdownCreateAttributes) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *IncidentTimelineCellCreateAttributes) GetActualInstance() interface{} { + if obj.IncidentTimelineCellMarkdownCreateAttributes != nil { + return obj.IncidentTimelineCellMarkdownCreateAttributes + } + + // all schemas are nil + return nil +} + +type NullableIncidentTimelineCellCreateAttributes struct { + value *IncidentTimelineCellCreateAttributes + isSet bool +} + +func (v NullableIncidentTimelineCellCreateAttributes) Get() *IncidentTimelineCellCreateAttributes { + return v.value +} + +func (v *NullableIncidentTimelineCellCreateAttributes) Set(val *IncidentTimelineCellCreateAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentTimelineCellCreateAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentTimelineCellCreateAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentTimelineCellCreateAttributes(val *IncidentTimelineCellCreateAttributes) *NullableIncidentTimelineCellCreateAttributes { + return &NullableIncidentTimelineCellCreateAttributes{value: val, isSet: true} +} + +func (v NullableIncidentTimelineCellCreateAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentTimelineCellCreateAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_timeline_cell_markdown_content_type.go b/api/v2/datadog/model_incident_timeline_cell_markdown_content_type.go new file mode 100644 index 00000000000..9c01087c2ca --- /dev/null +++ b/api/v2/datadog/model_incident_timeline_cell_markdown_content_type.go @@ -0,0 +1,80 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentTimelineCellMarkdownContentType Type of the Markdown timeline cell. +type IncidentTimelineCellMarkdownContentType string + +// List of IncidentTimelineCellMarkdownContentType +const ( + INCIDENTTIMELINECELLMARKDOWNCONTENTTYPE_MARKDOWN IncidentTimelineCellMarkdownContentType = "markdown" +) + +func (v *IncidentTimelineCellMarkdownContentType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := IncidentTimelineCellMarkdownContentType(value) + for _, existing := range []IncidentTimelineCellMarkdownContentType{"markdown"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid IncidentTimelineCellMarkdownContentType", value) +} + +// Ptr returns reference to IncidentTimelineCellMarkdownContentType value +func (v IncidentTimelineCellMarkdownContentType) Ptr() *IncidentTimelineCellMarkdownContentType { + return &v +} + +type NullableIncidentTimelineCellMarkdownContentType struct { + value *IncidentTimelineCellMarkdownContentType + isSet bool +} + +func (v NullableIncidentTimelineCellMarkdownContentType) Get() *IncidentTimelineCellMarkdownContentType { + return v.value +} + +func (v *NullableIncidentTimelineCellMarkdownContentType) Set(val *IncidentTimelineCellMarkdownContentType) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentTimelineCellMarkdownContentType) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentTimelineCellMarkdownContentType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentTimelineCellMarkdownContentType(val *IncidentTimelineCellMarkdownContentType) *NullableIncidentTimelineCellMarkdownContentType { + return &NullableIncidentTimelineCellMarkdownContentType{value: val, isSet: true} +} + +func (v NullableIncidentTimelineCellMarkdownContentType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentTimelineCellMarkdownContentType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_timeline_cell_markdown_create_attributes.go b/api/v2/datadog/model_incident_timeline_cell_markdown_create_attributes.go new file mode 100644 index 00000000000..56e4ca42d15 --- /dev/null +++ b/api/v2/datadog/model_incident_timeline_cell_markdown_create_attributes.go @@ -0,0 +1,176 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentTimelineCellMarkdownCreateAttributes Timeline cell data for Markdown timeline cells for a create request. +type IncidentTimelineCellMarkdownCreateAttributes struct { + CellType IncidentTimelineCellMarkdownContentType `json:"cell_type"` + Content IncidentTimelineCellMarkdownCreateAttributesContent `json:"content"` + // A flag indicating whether the timeline cell is important and should be highlighted. + Important *bool `json:"important,omitempty"` +} + +// NewIncidentTimelineCellMarkdownCreateAttributes instantiates a new IncidentTimelineCellMarkdownCreateAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentTimelineCellMarkdownCreateAttributes(cellType IncidentTimelineCellMarkdownContentType, content IncidentTimelineCellMarkdownCreateAttributesContent) *IncidentTimelineCellMarkdownCreateAttributes { + this := IncidentTimelineCellMarkdownCreateAttributes{} + this.CellType = cellType + this.Content = content + var important bool = false + this.Important = &important + return &this +} + +// NewIncidentTimelineCellMarkdownCreateAttributesWithDefaults instantiates a new IncidentTimelineCellMarkdownCreateAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentTimelineCellMarkdownCreateAttributesWithDefaults() *IncidentTimelineCellMarkdownCreateAttributes { + this := IncidentTimelineCellMarkdownCreateAttributes{} + var cellType IncidentTimelineCellMarkdownContentType = "markdown" + this.CellType = cellType + var important bool = false + this.Important = &important + return &this +} + +// GetCellType returns the CellType field value +func (o *IncidentTimelineCellMarkdownCreateAttributes) GetCellType() IncidentTimelineCellMarkdownContentType { + if o == nil { + var ret IncidentTimelineCellMarkdownContentType + return ret + } + + return o.CellType +} + +// GetCellTypeOk returns a tuple with the CellType field value +// and a boolean to check if the value has been set. +func (o *IncidentTimelineCellMarkdownCreateAttributes) GetCellTypeOk() (*IncidentTimelineCellMarkdownContentType, bool) { + if o == nil { + return nil, false + } + return &o.CellType, true +} + +// SetCellType sets field value +func (o *IncidentTimelineCellMarkdownCreateAttributes) SetCellType(v IncidentTimelineCellMarkdownContentType) { + o.CellType = v +} + +// GetContent returns the Content field value +func (o *IncidentTimelineCellMarkdownCreateAttributes) GetContent() IncidentTimelineCellMarkdownCreateAttributesContent { + if o == nil { + var ret IncidentTimelineCellMarkdownCreateAttributesContent + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *IncidentTimelineCellMarkdownCreateAttributes) GetContentOk() (*IncidentTimelineCellMarkdownCreateAttributesContent, bool) { + if o == nil { + return nil, false + } + return &o.Content, true +} + +// SetContent sets field value +func (o *IncidentTimelineCellMarkdownCreateAttributes) SetContent(v IncidentTimelineCellMarkdownCreateAttributesContent) { + o.Content = v +} + +// GetImportant returns the Important field value if set, zero value otherwise. +func (o *IncidentTimelineCellMarkdownCreateAttributes) GetImportant() bool { + if o == nil || o.Important == nil { + var ret bool + return ret + } + return *o.Important +} + +// GetImportantOk returns a tuple with the Important field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentTimelineCellMarkdownCreateAttributes) GetImportantOk() (*bool, bool) { + if o == nil || o.Important == nil { + return nil, false + } + return o.Important, true +} + +// HasImportant returns a boolean if a field has been set. +func (o *IncidentTimelineCellMarkdownCreateAttributes) HasImportant() bool { + if o != nil && o.Important != nil { + return true + } + + return false +} + +// SetImportant gets a reference to the given bool and assigns it to the Important field. +func (o *IncidentTimelineCellMarkdownCreateAttributes) SetImportant(v bool) { + o.Important = &v +} + +func (o IncidentTimelineCellMarkdownCreateAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["cell_type"] = o.CellType + } + if true { + toSerialize["content"] = o.Content + } + if o.Important != nil { + toSerialize["important"] = o.Important + } + return json.Marshal(toSerialize) +} + +type NullableIncidentTimelineCellMarkdownCreateAttributes struct { + value *IncidentTimelineCellMarkdownCreateAttributes + isSet bool +} + +func (v NullableIncidentTimelineCellMarkdownCreateAttributes) Get() *IncidentTimelineCellMarkdownCreateAttributes { + return v.value +} + +func (v *NullableIncidentTimelineCellMarkdownCreateAttributes) Set(val *IncidentTimelineCellMarkdownCreateAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentTimelineCellMarkdownCreateAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentTimelineCellMarkdownCreateAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentTimelineCellMarkdownCreateAttributes(val *IncidentTimelineCellMarkdownCreateAttributes) *NullableIncidentTimelineCellMarkdownCreateAttributes { + return &NullableIncidentTimelineCellMarkdownCreateAttributes{value: val, isSet: true} +} + +func (v NullableIncidentTimelineCellMarkdownCreateAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentTimelineCellMarkdownCreateAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_timeline_cell_markdown_create_attributes_content.go b/api/v2/datadog/model_incident_timeline_cell_markdown_create_attributes_content.go new file mode 100644 index 00000000000..adc089b0669 --- /dev/null +++ b/api/v2/datadog/model_incident_timeline_cell_markdown_create_attributes_content.go @@ -0,0 +1,112 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentTimelineCellMarkdownCreateAttributesContent The Markdown timeline cell contents. +type IncidentTimelineCellMarkdownCreateAttributesContent struct { + // The Markdown content of the cell. + Content *string `json:"content,omitempty"` +} + +// NewIncidentTimelineCellMarkdownCreateAttributesContent instantiates a new IncidentTimelineCellMarkdownCreateAttributesContent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentTimelineCellMarkdownCreateAttributesContent() *IncidentTimelineCellMarkdownCreateAttributesContent { + this := IncidentTimelineCellMarkdownCreateAttributesContent{} + return &this +} + +// NewIncidentTimelineCellMarkdownCreateAttributesContentWithDefaults instantiates a new IncidentTimelineCellMarkdownCreateAttributesContent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentTimelineCellMarkdownCreateAttributesContentWithDefaults() *IncidentTimelineCellMarkdownCreateAttributesContent { + this := IncidentTimelineCellMarkdownCreateAttributesContent{} + return &this +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *IncidentTimelineCellMarkdownCreateAttributesContent) GetContent() string { + if o == nil || o.Content == nil { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentTimelineCellMarkdownCreateAttributesContent) GetContentOk() (*string, bool) { + if o == nil || o.Content == nil { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *IncidentTimelineCellMarkdownCreateAttributesContent) HasContent() bool { + if o != nil && o.Content != nil { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *IncidentTimelineCellMarkdownCreateAttributesContent) SetContent(v string) { + o.Content = &v +} + +func (o IncidentTimelineCellMarkdownCreateAttributesContent) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Content != nil { + toSerialize["content"] = o.Content + } + return json.Marshal(toSerialize) +} + +type NullableIncidentTimelineCellMarkdownCreateAttributesContent struct { + value *IncidentTimelineCellMarkdownCreateAttributesContent + isSet bool +} + +func (v NullableIncidentTimelineCellMarkdownCreateAttributesContent) Get() *IncidentTimelineCellMarkdownCreateAttributesContent { + return v.value +} + +func (v *NullableIncidentTimelineCellMarkdownCreateAttributesContent) Set(val *IncidentTimelineCellMarkdownCreateAttributesContent) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentTimelineCellMarkdownCreateAttributesContent) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentTimelineCellMarkdownCreateAttributesContent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentTimelineCellMarkdownCreateAttributesContent(val *IncidentTimelineCellMarkdownCreateAttributesContent) *NullableIncidentTimelineCellMarkdownCreateAttributesContent { + return &NullableIncidentTimelineCellMarkdownCreateAttributesContent{value: val, isSet: true} +} + +func (v NullableIncidentTimelineCellMarkdownCreateAttributesContent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentTimelineCellMarkdownCreateAttributesContent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_type.go b/api/v2/datadog/model_incident_type.go new file mode 100644 index 00000000000..c4a31213e32 --- /dev/null +++ b/api/v2/datadog/model_incident_type.go @@ -0,0 +1,80 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "fmt" +) + +// IncidentType Incident resource type. +type IncidentType string + +// List of IncidentType +const ( + INCIDENTTYPE_INCIDENTS IncidentType = "incidents" +) + +func (v *IncidentType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := IncidentType(value) + for _, existing := range []IncidentType{"incidents"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid IncidentType", value) +} + +// Ptr returns reference to IncidentType value +func (v IncidentType) Ptr() *IncidentType { + return &v +} + +type NullableIncidentType struct { + value *IncidentType + isSet bool +} + +func (v NullableIncidentType) Get() *IncidentType { + return v.value +} + +func (v *NullableIncidentType) Set(val *IncidentType) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentType) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentType(val *IncidentType) *NullableIncidentType { + return &NullableIncidentType{value: val, isSet: true} +} + +func (v NullableIncidentType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_update_attributes.go b/api/v2/datadog/model_incident_update_attributes.go new file mode 100644 index 00000000000..aa685691422 --- /dev/null +++ b/api/v2/datadog/model_incident_update_attributes.go @@ -0,0 +1,453 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" + "time" +) + +// IncidentUpdateAttributes The incident's attributes for an update request. +type IncidentUpdateAttributes struct { + // Timestamp when customers were no longer impacted by the incident. + CustomerImpactEnd NullableTime `json:"customer_impact_end,omitempty"` + // A summary of the impact customers experienced during the incident. + CustomerImpactScope *string `json:"customer_impact_scope,omitempty"` + // Timestamp when customers began being impacted by the incident. + CustomerImpactStart NullableTime `json:"customer_impact_start,omitempty"` + // A flag indicating whether the incident caused customer impact. + CustomerImpacted *bool `json:"customer_impacted,omitempty"` + // Timestamp when the incident was detected. + Detected NullableTime `json:"detected,omitempty"` + // A condensed view of the user-defined fields for which to update selections. + Fields *map[string]IncidentFieldAttributes `json:"fields,omitempty"` + // Notification handles that will be notified of the incident during update. + NotificationHandles *[]string `json:"notification_handles,omitempty"` + // Timestamp when the incident's state was set to resolved. + Resolved NullableTime `json:"resolved,omitempty"` + // The title of the incident, which summarizes what happened. + Title *string `json:"title,omitempty"` +} + +// NewIncidentUpdateAttributes instantiates a new IncidentUpdateAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentUpdateAttributes() *IncidentUpdateAttributes { + this := IncidentUpdateAttributes{} + return &this +} + +// NewIncidentUpdateAttributesWithDefaults instantiates a new IncidentUpdateAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentUpdateAttributesWithDefaults() *IncidentUpdateAttributes { + this := IncidentUpdateAttributes{} + return &this +} + +// GetCustomerImpactEnd returns the CustomerImpactEnd field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentUpdateAttributes) GetCustomerImpactEnd() time.Time { + if o == nil || o.CustomerImpactEnd.Get() == nil { + var ret time.Time + return ret + } + return *o.CustomerImpactEnd.Get() +} + +// GetCustomerImpactEndOk returns a tuple with the CustomerImpactEnd field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentUpdateAttributes) GetCustomerImpactEndOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CustomerImpactEnd.Get(), o.CustomerImpactEnd.IsSet() +} + +// HasCustomerImpactEnd returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasCustomerImpactEnd() bool { + if o != nil && o.CustomerImpactEnd.IsSet() { + return true + } + + return false +} + +// SetCustomerImpactEnd gets a reference to the given NullableTime and assigns it to the CustomerImpactEnd field. +func (o *IncidentUpdateAttributes) SetCustomerImpactEnd(v time.Time) { + o.CustomerImpactEnd.Set(&v) +} + +// SetCustomerImpactEndNil sets the value for CustomerImpactEnd to be an explicit nil +func (o *IncidentUpdateAttributes) SetCustomerImpactEndNil() { + o.CustomerImpactEnd.Set(nil) +} + +// UnsetCustomerImpactEnd ensures that no value is present for CustomerImpactEnd, not even an explicit nil +func (o *IncidentUpdateAttributes) UnsetCustomerImpactEnd() { + o.CustomerImpactEnd.Unset() +} + +// GetCustomerImpactScope returns the CustomerImpactScope field value if set, zero value otherwise. +func (o *IncidentUpdateAttributes) GetCustomerImpactScope() string { + if o == nil || o.CustomerImpactScope == nil { + var ret string + return ret + } + return *o.CustomerImpactScope +} + +// GetCustomerImpactScopeOk returns a tuple with the CustomerImpactScope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateAttributes) GetCustomerImpactScopeOk() (*string, bool) { + if o == nil || o.CustomerImpactScope == nil { + return nil, false + } + return o.CustomerImpactScope, true +} + +// HasCustomerImpactScope returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasCustomerImpactScope() bool { + if o != nil && o.CustomerImpactScope != nil { + return true + } + + return false +} + +// SetCustomerImpactScope gets a reference to the given string and assigns it to the CustomerImpactScope field. +func (o *IncidentUpdateAttributes) SetCustomerImpactScope(v string) { + o.CustomerImpactScope = &v +} + +// GetCustomerImpactStart returns the CustomerImpactStart field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentUpdateAttributes) GetCustomerImpactStart() time.Time { + if o == nil || o.CustomerImpactStart.Get() == nil { + var ret time.Time + return ret + } + return *o.CustomerImpactStart.Get() +} + +// GetCustomerImpactStartOk returns a tuple with the CustomerImpactStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentUpdateAttributes) GetCustomerImpactStartOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CustomerImpactStart.Get(), o.CustomerImpactStart.IsSet() +} + +// HasCustomerImpactStart returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasCustomerImpactStart() bool { + if o != nil && o.CustomerImpactStart.IsSet() { + return true + } + + return false +} + +// SetCustomerImpactStart gets a reference to the given NullableTime and assigns it to the CustomerImpactStart field. +func (o *IncidentUpdateAttributes) SetCustomerImpactStart(v time.Time) { + o.CustomerImpactStart.Set(&v) +} + +// SetCustomerImpactStartNil sets the value for CustomerImpactStart to be an explicit nil +func (o *IncidentUpdateAttributes) SetCustomerImpactStartNil() { + o.CustomerImpactStart.Set(nil) +} + +// UnsetCustomerImpactStart ensures that no value is present for CustomerImpactStart, not even an explicit nil +func (o *IncidentUpdateAttributes) UnsetCustomerImpactStart() { + o.CustomerImpactStart.Unset() +} + +// GetCustomerImpacted returns the CustomerImpacted field value if set, zero value otherwise. +func (o *IncidentUpdateAttributes) GetCustomerImpacted() bool { + if o == nil || o.CustomerImpacted == nil { + var ret bool + return ret + } + return *o.CustomerImpacted +} + +// GetCustomerImpactedOk returns a tuple with the CustomerImpacted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateAttributes) GetCustomerImpactedOk() (*bool, bool) { + if o == nil || o.CustomerImpacted == nil { + return nil, false + } + return o.CustomerImpacted, true +} + +// HasCustomerImpacted returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasCustomerImpacted() bool { + if o != nil && o.CustomerImpacted != nil { + return true + } + + return false +} + +// SetCustomerImpacted gets a reference to the given bool and assigns it to the CustomerImpacted field. +func (o *IncidentUpdateAttributes) SetCustomerImpacted(v bool) { + o.CustomerImpacted = &v +} + +// GetDetected returns the Detected field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentUpdateAttributes) GetDetected() time.Time { + if o == nil || o.Detected.Get() == nil { + var ret time.Time + return ret + } + return *o.Detected.Get() +} + +// GetDetectedOk returns a tuple with the Detected field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentUpdateAttributes) GetDetectedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Detected.Get(), o.Detected.IsSet() +} + +// HasDetected returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasDetected() bool { + if o != nil && o.Detected.IsSet() { + return true + } + + return false +} + +// SetDetected gets a reference to the given NullableTime and assigns it to the Detected field. +func (o *IncidentUpdateAttributes) SetDetected(v time.Time) { + o.Detected.Set(&v) +} + +// SetDetectedNil sets the value for Detected to be an explicit nil +func (o *IncidentUpdateAttributes) SetDetectedNil() { + o.Detected.Set(nil) +} + +// UnsetDetected ensures that no value is present for Detected, not even an explicit nil +func (o *IncidentUpdateAttributes) UnsetDetected() { + o.Detected.Unset() +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *IncidentUpdateAttributes) GetFields() map[string]IncidentFieldAttributes { + if o == nil || o.Fields == nil { + var ret map[string]IncidentFieldAttributes + return ret + } + return *o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateAttributes) GetFieldsOk() (*map[string]IncidentFieldAttributes, bool) { + if o == nil || o.Fields == nil { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasFields() bool { + if o != nil && o.Fields != nil { + return true + } + + return false +} + +// SetFields gets a reference to the given map[string]IncidentFieldAttributes and assigns it to the Fields field. +func (o *IncidentUpdateAttributes) SetFields(v map[string]IncidentFieldAttributes) { + o.Fields = &v +} + +// GetNotificationHandles returns the NotificationHandles field value if set, zero value otherwise. +func (o *IncidentUpdateAttributes) GetNotificationHandles() []string { + if o == nil || o.NotificationHandles == nil { + var ret []string + return ret + } + return *o.NotificationHandles +} + +// GetNotificationHandlesOk returns a tuple with the NotificationHandles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateAttributes) GetNotificationHandlesOk() (*[]string, bool) { + if o == nil || o.NotificationHandles == nil { + return nil, false + } + return o.NotificationHandles, true +} + +// HasNotificationHandles returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasNotificationHandles() bool { + if o != nil && o.NotificationHandles != nil { + return true + } + + return false +} + +// SetNotificationHandles gets a reference to the given []string and assigns it to the NotificationHandles field. +func (o *IncidentUpdateAttributes) SetNotificationHandles(v []string) { + o.NotificationHandles = &v +} + +// GetResolved returns the Resolved field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IncidentUpdateAttributes) GetResolved() time.Time { + if o == nil || o.Resolved.Get() == nil { + var ret time.Time + return ret + } + return *o.Resolved.Get() +} + +// GetResolvedOk returns a tuple with the Resolved field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *IncidentUpdateAttributes) GetResolvedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Resolved.Get(), o.Resolved.IsSet() +} + +// HasResolved returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasResolved() bool { + if o != nil && o.Resolved.IsSet() { + return true + } + + return false +} + +// SetResolved gets a reference to the given NullableTime and assigns it to the Resolved field. +func (o *IncidentUpdateAttributes) SetResolved(v time.Time) { + o.Resolved.Set(&v) +} + +// SetResolvedNil sets the value for Resolved to be an explicit nil +func (o *IncidentUpdateAttributes) SetResolvedNil() { + o.Resolved.Set(nil) +} + +// UnsetResolved ensures that no value is present for Resolved, not even an explicit nil +func (o *IncidentUpdateAttributes) UnsetResolved() { + o.Resolved.Unset() +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *IncidentUpdateAttributes) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateAttributes) GetTitleOk() (*string, bool) { + if o == nil || o.Title == nil { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *IncidentUpdateAttributes) HasTitle() bool { + if o != nil && o.Title != nil { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *IncidentUpdateAttributes) SetTitle(v string) { + o.Title = &v +} + +func (o IncidentUpdateAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CustomerImpactEnd.IsSet() { + toSerialize["customer_impact_end"] = o.CustomerImpactEnd.Get() + } + if o.CustomerImpactScope != nil { + toSerialize["customer_impact_scope"] = o.CustomerImpactScope + } + if o.CustomerImpactStart.IsSet() { + toSerialize["customer_impact_start"] = o.CustomerImpactStart.Get() + } + if o.CustomerImpacted != nil { + toSerialize["customer_impacted"] = o.CustomerImpacted + } + if o.Detected.IsSet() { + toSerialize["detected"] = o.Detected.Get() + } + if o.Fields != nil { + toSerialize["fields"] = o.Fields + } + if o.NotificationHandles != nil { + toSerialize["notification_handles"] = o.NotificationHandles + } + if o.Resolved.IsSet() { + toSerialize["resolved"] = o.Resolved.Get() + } + if o.Title != nil { + toSerialize["title"] = o.Title + } + return json.Marshal(toSerialize) +} + +type NullableIncidentUpdateAttributes struct { + value *IncidentUpdateAttributes + isSet bool +} + +func (v NullableIncidentUpdateAttributes) Get() *IncidentUpdateAttributes { + return v.value +} + +func (v *NullableIncidentUpdateAttributes) Set(val *IncidentUpdateAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentUpdateAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentUpdateAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentUpdateAttributes(val *IncidentUpdateAttributes) *NullableIncidentUpdateAttributes { + return &NullableIncidentUpdateAttributes{value: val, isSet: true} +} + +func (v NullableIncidentUpdateAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentUpdateAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_update_data.go b/api/v2/datadog/model_incident_update_data.go new file mode 100644 index 00000000000..d5ee10662b4 --- /dev/null +++ b/api/v2/datadog/model_incident_update_data.go @@ -0,0 +1,208 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentUpdateData Incident data for an update request. +type IncidentUpdateData struct { + Attributes *IncidentUpdateAttributes `json:"attributes,omitempty"` + // The team's ID. + Id string `json:"id"` + Relationships *IncidentUpdateRelationships `json:"relationships,omitempty"` + Type IncidentType `json:"type"` +} + +// NewIncidentUpdateData instantiates a new IncidentUpdateData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentUpdateData(id string, type_ IncidentType) *IncidentUpdateData { + this := IncidentUpdateData{} + this.Id = id + this.Type = type_ + return &this +} + +// NewIncidentUpdateDataWithDefaults instantiates a new IncidentUpdateData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentUpdateDataWithDefaults() *IncidentUpdateData { + this := IncidentUpdateData{} + var type_ IncidentType = "incidents" + this.Type = type_ + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *IncidentUpdateData) GetAttributes() IncidentUpdateAttributes { + if o == nil || o.Attributes == nil { + var ret IncidentUpdateAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateData) GetAttributesOk() (*IncidentUpdateAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *IncidentUpdateData) HasAttributes() bool { + if o != nil && o.Attributes != nil { + return true + } + + return false +} + +// SetAttributes gets a reference to the given IncidentUpdateAttributes and assigns it to the Attributes field. +func (o *IncidentUpdateData) SetAttributes(v IncidentUpdateAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value +func (o *IncidentUpdateData) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *IncidentUpdateData) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *IncidentUpdateData) SetId(v string) { + o.Id = v +} + +// GetRelationships returns the Relationships field value if set, zero value otherwise. +func (o *IncidentUpdateData) GetRelationships() IncidentUpdateRelationships { + if o == nil || o.Relationships == nil { + var ret IncidentUpdateRelationships + return ret + } + return *o.Relationships +} + +// GetRelationshipsOk returns a tuple with the Relationships field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateData) GetRelationshipsOk() (*IncidentUpdateRelationships, bool) { + if o == nil || o.Relationships == nil { + return nil, false + } + return o.Relationships, true +} + +// HasRelationships returns a boolean if a field has been set. +func (o *IncidentUpdateData) HasRelationships() bool { + if o != nil && o.Relationships != nil { + return true + } + + return false +} + +// SetRelationships gets a reference to the given IncidentUpdateRelationships and assigns it to the Relationships field. +func (o *IncidentUpdateData) SetRelationships(v IncidentUpdateRelationships) { + o.Relationships = &v +} + +// GetType returns the Type field value +func (o *IncidentUpdateData) GetType() IncidentType { + if o == nil { + var ret IncidentType + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *IncidentUpdateData) GetTypeOk() (*IncidentType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *IncidentUpdateData) SetType(v IncidentType) { + o.Type = v +} + +func (o IncidentUpdateData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if true { + toSerialize["id"] = o.Id + } + if o.Relationships != nil { + toSerialize["relationships"] = o.Relationships + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableIncidentUpdateData struct { + value *IncidentUpdateData + isSet bool +} + +func (v NullableIncidentUpdateData) Get() *IncidentUpdateData { + return v.value +} + +func (v *NullableIncidentUpdateData) Set(val *IncidentUpdateData) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentUpdateData) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentUpdateData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentUpdateData(val *IncidentUpdateData) *NullableIncidentUpdateData { + return &NullableIncidentUpdateData{value: val, isSet: true} +} + +func (v NullableIncidentUpdateData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentUpdateData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_update_relationships.go b/api/v2/datadog/model_incident_update_relationships.go new file mode 100644 index 00000000000..8f75c2d1132 --- /dev/null +++ b/api/v2/datadog/model_incident_update_relationships.go @@ -0,0 +1,255 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentUpdateRelationships The incident's relationships for an update request. +type IncidentUpdateRelationships struct { + CommanderUser *RelationshipToUser `json:"commander_user,omitempty"` + CreatedByUser *RelationshipToUser `json:"created_by_user,omitempty"` + Integrations *RelationshipToIncidentIntegrationMetadatas `json:"integrations,omitempty"` + LastModifiedByUser *RelationshipToUser `json:"last_modified_by_user,omitempty"` + Postmortem *RelationshipToIncidentPostmortem `json:"postmortem,omitempty"` +} + +// NewIncidentUpdateRelationships instantiates a new IncidentUpdateRelationships object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentUpdateRelationships() *IncidentUpdateRelationships { + this := IncidentUpdateRelationships{} + return &this +} + +// NewIncidentUpdateRelationshipsWithDefaults instantiates a new IncidentUpdateRelationships object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentUpdateRelationshipsWithDefaults() *IncidentUpdateRelationships { + this := IncidentUpdateRelationships{} + return &this +} + +// GetCommanderUser returns the CommanderUser field value if set, zero value otherwise. +func (o *IncidentUpdateRelationships) GetCommanderUser() RelationshipToUser { + if o == nil || o.CommanderUser == nil { + var ret RelationshipToUser + return ret + } + return *o.CommanderUser +} + +// GetCommanderUserOk returns a tuple with the CommanderUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateRelationships) GetCommanderUserOk() (*RelationshipToUser, bool) { + if o == nil || o.CommanderUser == nil { + return nil, false + } + return o.CommanderUser, true +} + +// HasCommanderUser returns a boolean if a field has been set. +func (o *IncidentUpdateRelationships) HasCommanderUser() bool { + if o != nil && o.CommanderUser != nil { + return true + } + + return false +} + +// SetCommanderUser gets a reference to the given RelationshipToUser and assigns it to the CommanderUser field. +func (o *IncidentUpdateRelationships) SetCommanderUser(v RelationshipToUser) { + o.CommanderUser = &v +} + +// GetCreatedByUser returns the CreatedByUser field value if set, zero value otherwise. +func (o *IncidentUpdateRelationships) GetCreatedByUser() RelationshipToUser { + if o == nil || o.CreatedByUser == nil { + var ret RelationshipToUser + return ret + } + return *o.CreatedByUser +} + +// GetCreatedByUserOk returns a tuple with the CreatedByUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateRelationships) GetCreatedByUserOk() (*RelationshipToUser, bool) { + if o == nil || o.CreatedByUser == nil { + return nil, false + } + return o.CreatedByUser, true +} + +// HasCreatedByUser returns a boolean if a field has been set. +func (o *IncidentUpdateRelationships) HasCreatedByUser() bool { + if o != nil && o.CreatedByUser != nil { + return true + } + + return false +} + +// SetCreatedByUser gets a reference to the given RelationshipToUser and assigns it to the CreatedByUser field. +func (o *IncidentUpdateRelationships) SetCreatedByUser(v RelationshipToUser) { + o.CreatedByUser = &v +} + +// GetIntegrations returns the Integrations field value if set, zero value otherwise. +func (o *IncidentUpdateRelationships) GetIntegrations() RelationshipToIncidentIntegrationMetadatas { + if o == nil || o.Integrations == nil { + var ret RelationshipToIncidentIntegrationMetadatas + return ret + } + return *o.Integrations +} + +// GetIntegrationsOk returns a tuple with the Integrations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateRelationships) GetIntegrationsOk() (*RelationshipToIncidentIntegrationMetadatas, bool) { + if o == nil || o.Integrations == nil { + return nil, false + } + return o.Integrations, true +} + +// HasIntegrations returns a boolean if a field has been set. +func (o *IncidentUpdateRelationships) HasIntegrations() bool { + if o != nil && o.Integrations != nil { + return true + } + + return false +} + +// SetIntegrations gets a reference to the given RelationshipToIncidentIntegrationMetadatas and assigns it to the Integrations field. +func (o *IncidentUpdateRelationships) SetIntegrations(v RelationshipToIncidentIntegrationMetadatas) { + o.Integrations = &v +} + +// GetLastModifiedByUser returns the LastModifiedByUser field value if set, zero value otherwise. +func (o *IncidentUpdateRelationships) GetLastModifiedByUser() RelationshipToUser { + if o == nil || o.LastModifiedByUser == nil { + var ret RelationshipToUser + return ret + } + return *o.LastModifiedByUser +} + +// GetLastModifiedByUserOk returns a tuple with the LastModifiedByUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateRelationships) GetLastModifiedByUserOk() (*RelationshipToUser, bool) { + if o == nil || o.LastModifiedByUser == nil { + return nil, false + } + return o.LastModifiedByUser, true +} + +// HasLastModifiedByUser returns a boolean if a field has been set. +func (o *IncidentUpdateRelationships) HasLastModifiedByUser() bool { + if o != nil && o.LastModifiedByUser != nil { + return true + } + + return false +} + +// SetLastModifiedByUser gets a reference to the given RelationshipToUser and assigns it to the LastModifiedByUser field. +func (o *IncidentUpdateRelationships) SetLastModifiedByUser(v RelationshipToUser) { + o.LastModifiedByUser = &v +} + +// GetPostmortem returns the Postmortem field value if set, zero value otherwise. +func (o *IncidentUpdateRelationships) GetPostmortem() RelationshipToIncidentPostmortem { + if o == nil || o.Postmortem == nil { + var ret RelationshipToIncidentPostmortem + return ret + } + return *o.Postmortem +} + +// GetPostmortemOk returns a tuple with the Postmortem field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentUpdateRelationships) GetPostmortemOk() (*RelationshipToIncidentPostmortem, bool) { + if o == nil || o.Postmortem == nil { + return nil, false + } + return o.Postmortem, true +} + +// HasPostmortem returns a boolean if a field has been set. +func (o *IncidentUpdateRelationships) HasPostmortem() bool { + if o != nil && o.Postmortem != nil { + return true + } + + return false +} + +// SetPostmortem gets a reference to the given RelationshipToIncidentPostmortem and assigns it to the Postmortem field. +func (o *IncidentUpdateRelationships) SetPostmortem(v RelationshipToIncidentPostmortem) { + o.Postmortem = &v +} + +func (o IncidentUpdateRelationships) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CommanderUser != nil { + toSerialize["commander_user"] = o.CommanderUser + } + if o.CreatedByUser != nil { + toSerialize["created_by_user"] = o.CreatedByUser + } + if o.Integrations != nil { + toSerialize["integrations"] = o.Integrations + } + if o.LastModifiedByUser != nil { + toSerialize["last_modified_by_user"] = o.LastModifiedByUser + } + if o.Postmortem != nil { + toSerialize["postmortem"] = o.Postmortem + } + return json.Marshal(toSerialize) +} + +type NullableIncidentUpdateRelationships struct { + value *IncidentUpdateRelationships + isSet bool +} + +func (v NullableIncidentUpdateRelationships) Get() *IncidentUpdateRelationships { + return v.value +} + +func (v *NullableIncidentUpdateRelationships) Set(val *IncidentUpdateRelationships) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentUpdateRelationships) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentUpdateRelationships) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentUpdateRelationships(val *IncidentUpdateRelationships) *NullableIncidentUpdateRelationships { + return &NullableIncidentUpdateRelationships{value: val, isSet: true} +} + +func (v NullableIncidentUpdateRelationships) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentUpdateRelationships) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incident_update_request.go b/api/v2/datadog/model_incident_update_request.go new file mode 100644 index 00000000000..ac58336b8de --- /dev/null +++ b/api/v2/datadog/model_incident_update_request.go @@ -0,0 +1,104 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentUpdateRequest Update request for an incident. +type IncidentUpdateRequest struct { + Data IncidentUpdateData `json:"data"` +} + +// NewIncidentUpdateRequest instantiates a new IncidentUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentUpdateRequest(data IncidentUpdateData) *IncidentUpdateRequest { + this := IncidentUpdateRequest{} + this.Data = data + return &this +} + +// NewIncidentUpdateRequestWithDefaults instantiates a new IncidentUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentUpdateRequestWithDefaults() *IncidentUpdateRequest { + this := IncidentUpdateRequest{} + return &this +} + +// GetData returns the Data field value +func (o *IncidentUpdateRequest) GetData() IncidentUpdateData { + if o == nil { + var ret IncidentUpdateData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *IncidentUpdateRequest) GetDataOk() (*IncidentUpdateData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *IncidentUpdateRequest) SetData(v IncidentUpdateData) { + o.Data = v +} + +func (o IncidentUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableIncidentUpdateRequest struct { + value *IncidentUpdateRequest + isSet bool +} + +func (v NullableIncidentUpdateRequest) Get() *IncidentUpdateRequest { + return v.value +} + +func (v *NullableIncidentUpdateRequest) Set(val *IncidentUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentUpdateRequest(val *IncidentUpdateRequest) *NullableIncidentUpdateRequest { + return &NullableIncidentUpdateRequest{value: val, isSet: true} +} + +func (v NullableIncidentUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_incidents_response.go b/api/v2/datadog/model_incidents_response.go new file mode 100644 index 00000000000..f9a2b036e80 --- /dev/null +++ b/api/v2/datadog/model_incidents_response.go @@ -0,0 +1,178 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// IncidentsResponse Response with a list of incidents. +type IncidentsResponse struct { + // An array of incidents. + Data []IncidentResponseData `json:"data"` + // Included related resources that the user requested. + Included *[]IncidentResponseIncludedItem `json:"included,omitempty"` + Meta *IncidentServicesResponseMeta `json:"meta,omitempty"` +} + +// NewIncidentsResponse instantiates a new IncidentsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncidentsResponse(data []IncidentResponseData) *IncidentsResponse { + this := IncidentsResponse{} + this.Data = data + return &this +} + +// NewIncidentsResponseWithDefaults instantiates a new IncidentsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncidentsResponseWithDefaults() *IncidentsResponse { + this := IncidentsResponse{} + return &this +} + +// GetData returns the Data field value +func (o *IncidentsResponse) GetData() []IncidentResponseData { + if o == nil { + var ret []IncidentResponseData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *IncidentsResponse) GetDataOk() (*[]IncidentResponseData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *IncidentsResponse) SetData(v []IncidentResponseData) { + o.Data = v +} + +// GetIncluded returns the Included field value if set, zero value otherwise. +func (o *IncidentsResponse) GetIncluded() []IncidentResponseIncludedItem { + if o == nil || o.Included == nil { + var ret []IncidentResponseIncludedItem + return ret + } + return *o.Included +} + +// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentsResponse) GetIncludedOk() (*[]IncidentResponseIncludedItem, bool) { + if o == nil || o.Included == nil { + return nil, false + } + return o.Included, true +} + +// HasIncluded returns a boolean if a field has been set. +func (o *IncidentsResponse) HasIncluded() bool { + if o != nil && o.Included != nil { + return true + } + + return false +} + +// SetIncluded gets a reference to the given []IncidentResponseIncludedItem and assigns it to the Included field. +func (o *IncidentsResponse) SetIncluded(v []IncidentResponseIncludedItem) { + o.Included = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *IncidentsResponse) GetMeta() IncidentServicesResponseMeta { + if o == nil || o.Meta == nil { + var ret IncidentServicesResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncidentsResponse) GetMetaOk() (*IncidentServicesResponseMeta, bool) { + if o == nil || o.Meta == nil { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *IncidentsResponse) HasMeta() bool { + if o != nil && o.Meta != nil { + return true + } + + return false +} + +// SetMeta gets a reference to the given IncidentServicesResponseMeta and assigns it to the Meta field. +func (o *IncidentsResponse) SetMeta(v IncidentServicesResponseMeta) { + o.Meta = &v +} + +func (o IncidentsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["data"] = o.Data + } + if o.Included != nil { + toSerialize["included"] = o.Included + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + return json.Marshal(toSerialize) +} + +type NullableIncidentsResponse struct { + value *IncidentsResponse + isSet bool +} + +func (v NullableIncidentsResponse) Get() *IncidentsResponse { + return v.value +} + +func (v *NullableIncidentsResponse) Set(val *IncidentsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableIncidentsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableIncidentsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncidentsResponse(val *IncidentsResponse) *NullableIncidentsResponse { + return &NullableIncidentsResponse{value: val, isSet: true} +} + +func (v NullableIncidentsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncidentsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_relationship_to_incident_integration_metadata_data.go b/api/v2/datadog/model_relationship_to_incident_integration_metadata_data.go new file mode 100644 index 00000000000..81621186db9 --- /dev/null +++ b/api/v2/datadog/model_relationship_to_incident_integration_metadata_data.go @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// RelationshipToIncidentIntegrationMetadataData A relationship reference for an integration metadata object. +type RelationshipToIncidentIntegrationMetadataData struct { + // A unique identifier that represents the integration metadata. + Id string `json:"id"` + Type IncidentIntegrationMetadataType `json:"type"` +} + +// NewRelationshipToIncidentIntegrationMetadataData instantiates a new RelationshipToIncidentIntegrationMetadataData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipToIncidentIntegrationMetadataData(id string, type_ IncidentIntegrationMetadataType) *RelationshipToIncidentIntegrationMetadataData { + this := RelationshipToIncidentIntegrationMetadataData{} + this.Id = id + this.Type = type_ + return &this +} + +// NewRelationshipToIncidentIntegrationMetadataDataWithDefaults instantiates a new RelationshipToIncidentIntegrationMetadataData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipToIncidentIntegrationMetadataDataWithDefaults() *RelationshipToIncidentIntegrationMetadataData { + this := RelationshipToIncidentIntegrationMetadataData{} + var type_ IncidentIntegrationMetadataType = "incident_integration_metadata" + this.Type = type_ + return &this +} + +// GetId returns the Id field value +func (o *RelationshipToIncidentIntegrationMetadataData) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RelationshipToIncidentIntegrationMetadataData) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RelationshipToIncidentIntegrationMetadataData) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *RelationshipToIncidentIntegrationMetadataData) GetType() IncidentIntegrationMetadataType { + if o == nil { + var ret IncidentIntegrationMetadataType + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RelationshipToIncidentIntegrationMetadataData) GetTypeOk() (*IncidentIntegrationMetadataType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RelationshipToIncidentIntegrationMetadataData) SetType(v IncidentIntegrationMetadataType) { + o.Type = v +} + +func (o RelationshipToIncidentIntegrationMetadataData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableRelationshipToIncidentIntegrationMetadataData struct { + value *RelationshipToIncidentIntegrationMetadataData + isSet bool +} + +func (v NullableRelationshipToIncidentIntegrationMetadataData) Get() *RelationshipToIncidentIntegrationMetadataData { + return v.value +} + +func (v *NullableRelationshipToIncidentIntegrationMetadataData) Set(val *RelationshipToIncidentIntegrationMetadataData) { + v.value = val + v.isSet = true +} + +func (v NullableRelationshipToIncidentIntegrationMetadataData) IsSet() bool { + return v.isSet +} + +func (v *NullableRelationshipToIncidentIntegrationMetadataData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelationshipToIncidentIntegrationMetadataData(val *RelationshipToIncidentIntegrationMetadataData) *NullableRelationshipToIncidentIntegrationMetadataData { + return &NullableRelationshipToIncidentIntegrationMetadataData{value: val, isSet: true} +} + +func (v NullableRelationshipToIncidentIntegrationMetadataData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelationshipToIncidentIntegrationMetadataData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_relationship_to_incident_integration_metadatas.go b/api/v2/datadog/model_relationship_to_incident_integration_metadatas.go new file mode 100644 index 00000000000..eba7173b965 --- /dev/null +++ b/api/v2/datadog/model_relationship_to_incident_integration_metadatas.go @@ -0,0 +1,105 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// RelationshipToIncidentIntegrationMetadatas A relationship reference for multiple integration metadata objects. +type RelationshipToIncidentIntegrationMetadatas struct { + // The integration metadata relationship array + Data []RelationshipToIncidentIntegrationMetadataData `json:"data"` +} + +// NewRelationshipToIncidentIntegrationMetadatas instantiates a new RelationshipToIncidentIntegrationMetadatas object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipToIncidentIntegrationMetadatas(data []RelationshipToIncidentIntegrationMetadataData) *RelationshipToIncidentIntegrationMetadatas { + this := RelationshipToIncidentIntegrationMetadatas{} + this.Data = data + return &this +} + +// NewRelationshipToIncidentIntegrationMetadatasWithDefaults instantiates a new RelationshipToIncidentIntegrationMetadatas object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipToIncidentIntegrationMetadatasWithDefaults() *RelationshipToIncidentIntegrationMetadatas { + this := RelationshipToIncidentIntegrationMetadatas{} + return &this +} + +// GetData returns the Data field value +func (o *RelationshipToIncidentIntegrationMetadatas) GetData() []RelationshipToIncidentIntegrationMetadataData { + if o == nil { + var ret []RelationshipToIncidentIntegrationMetadataData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *RelationshipToIncidentIntegrationMetadatas) GetDataOk() (*[]RelationshipToIncidentIntegrationMetadataData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *RelationshipToIncidentIntegrationMetadatas) SetData(v []RelationshipToIncidentIntegrationMetadataData) { + o.Data = v +} + +func (o RelationshipToIncidentIntegrationMetadatas) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableRelationshipToIncidentIntegrationMetadatas struct { + value *RelationshipToIncidentIntegrationMetadatas + isSet bool +} + +func (v NullableRelationshipToIncidentIntegrationMetadatas) Get() *RelationshipToIncidentIntegrationMetadatas { + return v.value +} + +func (v *NullableRelationshipToIncidentIntegrationMetadatas) Set(val *RelationshipToIncidentIntegrationMetadatas) { + v.value = val + v.isSet = true +} + +func (v NullableRelationshipToIncidentIntegrationMetadatas) IsSet() bool { + return v.isSet +} + +func (v *NullableRelationshipToIncidentIntegrationMetadatas) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelationshipToIncidentIntegrationMetadatas(val *RelationshipToIncidentIntegrationMetadatas) *NullableRelationshipToIncidentIntegrationMetadatas { + return &NullableRelationshipToIncidentIntegrationMetadatas{value: val, isSet: true} +} + +func (v NullableRelationshipToIncidentIntegrationMetadatas) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelationshipToIncidentIntegrationMetadatas) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_relationship_to_incident_postmortem.go b/api/v2/datadog/model_relationship_to_incident_postmortem.go new file mode 100644 index 00000000000..d8742618c78 --- /dev/null +++ b/api/v2/datadog/model_relationship_to_incident_postmortem.go @@ -0,0 +1,104 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// RelationshipToIncidentPostmortem A relationship reference for postmortems. +type RelationshipToIncidentPostmortem struct { + Data RelationshipToIncidentPostmortemData `json:"data"` +} + +// NewRelationshipToIncidentPostmortem instantiates a new RelationshipToIncidentPostmortem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipToIncidentPostmortem(data RelationshipToIncidentPostmortemData) *RelationshipToIncidentPostmortem { + this := RelationshipToIncidentPostmortem{} + this.Data = data + return &this +} + +// NewRelationshipToIncidentPostmortemWithDefaults instantiates a new RelationshipToIncidentPostmortem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipToIncidentPostmortemWithDefaults() *RelationshipToIncidentPostmortem { + this := RelationshipToIncidentPostmortem{} + return &this +} + +// GetData returns the Data field value +func (o *RelationshipToIncidentPostmortem) GetData() RelationshipToIncidentPostmortemData { + if o == nil { + var ret RelationshipToIncidentPostmortemData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *RelationshipToIncidentPostmortem) GetDataOk() (*RelationshipToIncidentPostmortemData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *RelationshipToIncidentPostmortem) SetData(v RelationshipToIncidentPostmortemData) { + o.Data = v +} + +func (o RelationshipToIncidentPostmortem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableRelationshipToIncidentPostmortem struct { + value *RelationshipToIncidentPostmortem + isSet bool +} + +func (v NullableRelationshipToIncidentPostmortem) Get() *RelationshipToIncidentPostmortem { + return v.value +} + +func (v *NullableRelationshipToIncidentPostmortem) Set(val *RelationshipToIncidentPostmortem) { + v.value = val + v.isSet = true +} + +func (v NullableRelationshipToIncidentPostmortem) IsSet() bool { + return v.isSet +} + +func (v *NullableRelationshipToIncidentPostmortem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelationshipToIncidentPostmortem(val *RelationshipToIncidentPostmortem) *NullableRelationshipToIncidentPostmortem { + return &NullableRelationshipToIncidentPostmortem{value: val, isSet: true} +} + +func (v NullableRelationshipToIncidentPostmortem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelationshipToIncidentPostmortem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/api/v2/datadog/model_relationship_to_incident_postmortem_data.go b/api/v2/datadog/model_relationship_to_incident_postmortem_data.go new file mode 100644 index 00000000000..a7f06777d8c --- /dev/null +++ b/api/v2/datadog/model_relationship_to_incident_postmortem_data.go @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package datadog + +import ( + "encoding/json" +) + +// RelationshipToIncidentPostmortemData The postmortem relationship data. +type RelationshipToIncidentPostmortemData struct { + // A unique identifier that represents the postmortem. + Id string `json:"id"` + Type IncidentPostmortemType `json:"type"` +} + +// NewRelationshipToIncidentPostmortemData instantiates a new RelationshipToIncidentPostmortemData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipToIncidentPostmortemData(id string, type_ IncidentPostmortemType) *RelationshipToIncidentPostmortemData { + this := RelationshipToIncidentPostmortemData{} + this.Id = id + this.Type = type_ + return &this +} + +// NewRelationshipToIncidentPostmortemDataWithDefaults instantiates a new RelationshipToIncidentPostmortemData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipToIncidentPostmortemDataWithDefaults() *RelationshipToIncidentPostmortemData { + this := RelationshipToIncidentPostmortemData{} + var type_ IncidentPostmortemType = "incident_postmortems" + this.Type = type_ + return &this +} + +// GetId returns the Id field value +func (o *RelationshipToIncidentPostmortemData) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RelationshipToIncidentPostmortemData) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RelationshipToIncidentPostmortemData) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *RelationshipToIncidentPostmortemData) GetType() IncidentPostmortemType { + if o == nil { + var ret IncidentPostmortemType + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RelationshipToIncidentPostmortemData) GetTypeOk() (*IncidentPostmortemType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RelationshipToIncidentPostmortemData) SetType(v IncidentPostmortemType) { + o.Type = v +} + +func (o RelationshipToIncidentPostmortemData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableRelationshipToIncidentPostmortemData struct { + value *RelationshipToIncidentPostmortemData + isSet bool +} + +func (v NullableRelationshipToIncidentPostmortemData) Get() *RelationshipToIncidentPostmortemData { + return v.value +} + +func (v *NullableRelationshipToIncidentPostmortemData) Set(val *RelationshipToIncidentPostmortemData) { + v.value = val + v.isSet = true +} + +func (v NullableRelationshipToIncidentPostmortemData) IsSet() bool { + return v.isSet +} + +func (v *NullableRelationshipToIncidentPostmortemData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelationshipToIncidentPostmortemData(val *RelationshipToIncidentPostmortemData) *NullableRelationshipToIncidentPostmortemData { + return &NullableRelationshipToIncidentPostmortemData{value: val, isSet: true} +} + +func (v NullableRelationshipToIncidentPostmortemData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelationshipToIncidentPostmortemData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_a_new_incident_returns__CREATED__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_a_new_incident_returns__CREATED__response.freeze new file mode 100644 index 00000000000..c56bfb26d10 --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_a_new_incident_returns__CREATED__response.freeze @@ -0,0 +1 @@ +2020-09-25T16:40:31.072244-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_a_new_incident_returns__CREATED__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_a_new_incident_returns__CREATED__response.yaml new file mode 100644 index 00000000000..79d152ae3fb --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_a_new_incident_returns__CREATED__response.yaml @@ -0,0 +1,214 @@ +--- +version: 1 +interactions: +- request: + body: | + {"data":{"attributes":{"email":"go-testscenarios-feature_incidents-scenario_create_a_new_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1601066431@datadoghq.com","name":"go-testscenarios-feature_incidents-scenario_","title":"Big boss"},"type":"users"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - CreateUser + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "813173948041893165" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "837216621704333545" + url: https://api.datadoghq.com/api/v2/users + method: POST + response: + body: '{"data":{"type":"users","id":"5a6c4782-ff6f-11ea-b373-27a41819f2ac","attributes":{"name":"go-testscenarios-feature_incidents-scenario_","handle":"go-testscenarios-feature_incidents-scenario_create_a_new_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1601066431@datadoghq.com","created_at":"2020-09-25T20:40:31.170031+00:00","email":"go-testscenarios-feature_incidents-scenario_create_a_new_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1601066431@datadoghq.com","icon":"https://secure.gravatar.com/avatar/13e11d82681f48bd5641d8d20b9bf096?s=48&d=retro","title":"Big + boss","verified":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "845" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:40:31 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:40:31 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - RxKcx0U1IrcJ2sL0co6YTKQdWxTKBjGeO6Rh6plfmXfsHGMiZ332nvRBeUlqIMht + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 201 Created + code: 201 + duration: "" +- request: + body: | + {"data":{"attributes":{"customer_impacted":false,"title":"go-Feature_Incidents-Scenario_Create_a_new_incident_returns__CREATED__response-local-1601066431"},"relationships":{"commander":{"data":{"id":"5a6c4782-ff6f-11ea-b373-27a41819f2ac","type":"users"}}},"type":"incidents"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - CreateIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "2267173415777810933" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "837216621704333545" + url: https://api.datadoghq.com/api/v2/incidents + method: POST + response: + body: '{"data":{"type":"incidents","id":"0c80ef7b-bc92-50be-a355-7d3cc0b7ced3","attributes":{"public_id":198,"postmortem_id":null,"title":"go-Feature_Incidents-Scenario_Create_a_new_incident_returns__CREATED__response-local-1601066431","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":null,"created":"2020-09-25T20:40:31.436676+00:00","modified":"2020-09-25T20:40:31.436676+00:00","commander":{"data":{"type":"users","id":"5a6c4782-ff6f-11ea-b373-27a41819f2ac","attributes":{"uuid":"5a6c4782-ff6f-11ea-b373-27a41819f2ac","handle":"go-testscenarios-feature_incidents-scenario_create_a_new_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1601066431@datadoghq.com","email":"go-testscenarios-feature_incidents-scenario_create_a_new_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1601066431@datadoghq.com","name":"go-testscenarios-feature_incidents-scenario_","icon":"https://secure.gravatar.com/avatar/13e11d82681f48bd5641d8d20b9bf096?s=48&d=retro"}}},"state":"active","detected":"2020-09-25T20:40:31.434478+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":null,"creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"severity":"UNKNOWN","udf_values":null,"additional_notifications":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":null},"teams":{"data":[]},"services":{"data":[]},"user_defined_field_selections":{"data":[]},"user_defined_fields":{"data":[]},"postmortem":{"data":null},"integrations":{"data":[]}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "2450" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:40:34 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:40:31 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - 0e2Tq/aa08wSuRoWDdF6eCwF8GPYPPLmf3Lxvgc5OscTNyr8D4p+ksnId5WnGnR4 + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "8718807019666367422" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "837216621704333545" + url: https://api.datadoghq.com/api/v2/incidents/0c80ef7b-bc92-50be-a355-7d3cc0b7ced3 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:40:36 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:40:34 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - /0aUVUH/0B08LSgkH1j961ejfqRhimJkYAixzpnRf5lscmOFHWjl/leOQ3Mnfn7R + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DisableUser + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "3229288339354929218" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "837216621704333545" + url: https://api.datadoghq.com/api/v2/users/5a6c4782-ff6f-11ea-b373-27a41819f2ac + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:40:36 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:40:36 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - KdWc5RppKH51u1oZ6tf2ghJTVEevh006eS91RDKZLGoax50FN2VjMvek2ayUmkXw + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_an_incident_returns__CREATED__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_an_incident_returns__CREATED__response.freeze new file mode 100644 index 00000000000..62f5994139e --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_an_incident_returns__CREATED__response.freeze @@ -0,0 +1 @@ +2020-11-13T16:00:47.735254-06:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_an_incident_returns__CREATED__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_an_incident_returns__CREATED__response.yaml new file mode 100644 index 00000000000..e67e3b489de --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Create_an_incident_returns__CREATED__response.yaml @@ -0,0 +1,171 @@ +--- +version: 1 +interactions: +- request: + body: | + {"data":{"attributes":{"email":"go-testscenarios-feature_incidents-scenario_create_an_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1605304847@datadoghq.com","name":"go-testscenarios-feature_incidents-scenario_","title":"Big boss"},"type":"users"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - CreateUser + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "6136536865661497570" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "384198088319565196" + url: https://api.datadoghq.com/api/v2/users + method: POST + response: + body: '{"data":{"type":"users","id":"af9ba8bc-25fb-11eb-82be-7f348f35a88b","attributes":{"name":"go-testscenarios-feature_incidents-scenario_","handle":"go-testscenarios-feature_incidents-scenario_create_an_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1605304847@datadoghq.com","created_at":"2020-11-13T22:00:47.813591+00:00","email":"go-testscenarios-feature_incidents-scenario_create_an_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1605304847@datadoghq.com","icon":"https://secure.gravatar.com/avatar/4cf7efbff52a3930a86d4d5c6c2fddbf?s=48&d=retro","title":"Big + boss","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "863" + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:47 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:47 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - ks6TYG2WFSBr2qT+ZTFJB8BB7VWuwPmODDq52A4JjLzCAAitR8HQc9JBq+LHjJu4 + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + status: 201 Created + code: 201 + duration: "" +- request: + body: | + {"data":{"attributes":{"customer_impacted":false,"fields":{"state":{"type":"dropdown","value":"resolved"}},"title":"go-Feature_Incidents-Scenario_Create_an_incident_returns__CREATED__response-local-1605304847"},"relationships":{"commander":{"data":{"id":"af9ba8bc-25fb-11eb-82be-7f348f35a88b","type":"users"}}},"type":"incidents"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - CreateIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "6634062786633177818" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "384198088319565196" + url: https://api.datadoghq.com/api/v2/incidents + method: POST + response: + body: '{"data":{"type":"incidents","id":"d8cb7daa-daa6-59ba-b3a6-b5f14e26c8de","attributes":{"public_id":233,"postmortem_id":null,"title":"go-Feature_Incidents-Scenario_Create_an_incident_returns__CREATED__response-local-1605304847","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":null,"created":"2020-11-13T22:00:48.058019+00:00","modified":"2020-11-13T22:00:48.058019+00:00","commander":{"data":{"type":"users","id":"af9ba8bc-25fb-11eb-82be-7f348f35a88b","attributes":{"uuid":"af9ba8bc-25fb-11eb-82be-7f348f35a88b","handle":"go-testscenarios-feature_incidents-scenario_create_an_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1605304847@datadoghq.com","email":"go-testscenarios-feature_incidents-scenario_create_an_incident_returns__created__response-given_there_is_a_valid__user__in_the_system-local-1605304847@datadoghq.com","name":"go-testscenarios-feature_incidents-scenario_","icon":"https://secure.gravatar.com/avatar/4cf7efbff52a3930a86d4d5c6c2fddbf?s=48&d=retro"}}},"detected":"2020-11-13T22:00:48.056237+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":null,"creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"resolved"},"services":{"type":"autocomplete","value":null}},"severity":"UNKNOWN","state":"resolved","udf_values":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"af9ba8bc-25fb-11eb-82be-7f348f35a88b"}},"user_defined_field_selections":{"data":[{"type":"user_defined_selection","id":"7701d854-4973-5acb-b1c3-3f674dc74203"},{"type":"user_defined_selection","id":"f6e7b907-c72c-5747-bb70-2cf47886cc41"},{"type":"user_defined_selection","id":"80a0a153-23b2-56dc-9f1a-99ac8dc05563"}]},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"}]},"postmortem":{"data":null},"integrations":{"data":[]}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "3430" + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:49 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:48 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - hw3ZauSSamfHLo55DFwif1/mO6RiYSc0/libBchlIMnyWX9rK7JgS3Pek5rkz683 + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "20" + X-Ratelimit-Period: + - "3600" + X-Ratelimit-Remaining: + - "18" + X-Ratelimit-Reset: + - "3552" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DisableUser + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "1450923872454942949" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "384198088319565196" + url: https://api.datadoghq.com/api/v2/users/af9ba8bc-25fb-11eb-82be-7f348f35a88b + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:49 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:49 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - H6YNJZe2hxg7AD4MytxnK6WTGV3v238t6qy6wX4rqFlv+Cb0Gp+GU8J41gMZvmVb + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Delete_an_existing_incident_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Delete_an_existing_incident_returns__OK__response.freeze new file mode 100644 index 00000000000..f4641691f23 --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Delete_an_existing_incident_returns__OK__response.freeze @@ -0,0 +1 @@ +2020-11-13T16:00:49.575238-06:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Delete_an_existing_incident_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Delete_an_existing_incident_returns__OK__response.yaml new file mode 100644 index 00000000000..762cd146948 --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Delete_an_existing_incident_returns__OK__response.yaml @@ -0,0 +1,178 @@ +--- +version: 1 +interactions: +- request: + body: | + {"data":{"attributes":{"customer_impacted":false,"title":"go-TestScenarios-Feature_Incidents-Scenario_Delete_an_existing_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304849"},"type":"incidents"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - CreateIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "2486481832612156225" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "2924126076272235474" + url: https://api.datadoghq.com/api/v2/incidents + method: POST + response: + body: '{"data":{"type":"incidents","id":"179e4231-5c72-58a8-a15b-0384e803cba4","attributes":{"public_id":234,"postmortem_id":null,"title":"go-TestScenarios-Feature_Incidents-Scenario_Delete_an_existing_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304849","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":null,"created":"2020-11-13T22:00:49.635370+00:00","modified":"2020-11-13T22:00:49.635370+00:00","commander":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"detected":"2020-11-13T22:00:49.633147+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":null,"creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null}},"severity":"UNKNOWN","state":"active","udf_values":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_field_selections":{"data":[{"type":"user_defined_selection","id":"2bb9f100-785f-53de-89ef-30a5b9e1859b"},{"type":"user_defined_selection","id":"ce875ca6-0c9e-515a-8d62-ddbbcd929fe0"},{"type":"user_defined_selection","id":"6bd362aa-7cbb-52ed-a440-06b10e0d4840"}]},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"}]},"postmortem":{"data":null},"integrations":{"data":[]}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "3156" + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:51 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:49 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - bCBSaf0t3cWhIJuGOGz9PtbBY7MrMPu1HpZVAposegdxNlFMe/qHi/UbtNAIVmzS + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "20" + X-Ratelimit-Period: + - "3600" + X-Ratelimit-Remaining: + - "17" + X-Ratelimit-Reset: + - "3551" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "2472301927752524394" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "2924126076272235474" + url: https://api.datadoghq.com/api/v2/incidents/179e4231-5c72-58a8-a15b-0384e803cba4 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:51 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:51 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - 91aMs4Xd/NaPhGMoIvSvdd0mjw6sy0ZqzVUdTt9hqt35qwhu0snxCQESFXt90Pzi + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "20" + X-Ratelimit-Period: + - "60" + X-Ratelimit-Remaining: + - "19" + X-Ratelimit-Reset: + - "9" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "7157937947704006939" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "2924126076272235474" + url: https://api.datadoghq.com/api/v2/incidents/179e4231-5c72-58a8-a15b-0384e803cba4 + method: DELETE + response: + body: '{"errors": ["incident 179e4231-5c72-58a8-a15b-0384e803cba4 not found"]}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:51 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=15724800; + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "20" + X-Ratelimit-Period: + - "60" + X-Ratelimit-Remaining: + - "18" + X-Ratelimit-Reset: + - "9" + status: 404 Not Found + code: 404 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_a_list_of_incidents_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_a_list_of_incidents_returns__OK__response.freeze new file mode 100644 index 00000000000..244f42cd61e --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_a_list_of_incidents_returns__OK__response.freeze @@ -0,0 +1 @@ +2020-11-13T16:00:45.748134-06:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_a_list_of_incidents_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_a_list_of_incidents_returns__OK__response.yaml new file mode 100644 index 00000000000..94ce8d937b1 --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_a_list_of_incidents_returns__OK__response.yaml @@ -0,0 +1,124 @@ +--- +version: 1 +interactions: +- request: + body: | + {"data":{"attributes":{"customer_impacted":false,"title":"go-TestScenarios-Feature_Incidents-Scenario_Get_a_list_of_incidents_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304845"},"type":"incidents"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - CreateIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "2982414540478412601" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "4462229472913174353" + url: https://api.datadoghq.com/api/v2/incidents + method: POST + response: + body: '{"data":{"type":"incidents","id":"85619ab5-e5e7-5397-aca6-e11938036ac6","attributes":{"public_id":232,"postmortem_id":null,"title":"go-TestScenarios-Feature_Incidents-Scenario_Get_a_list_of_incidents_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304845","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":null,"created":"2020-11-13T22:00:46.085116+00:00","modified":"2020-11-13T22:00:46.085116+00:00","commander":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"detected":"2020-11-13T22:00:46.083523+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":null,"creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null}},"severity":"UNKNOWN","state":"active","udf_values":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_field_selections":{"data":[{"type":"user_defined_selection","id":"c5b46a25-3fe4-5957-9ee6-99eeb45d33c6"},{"type":"user_defined_selection","id":"5cfcac74-e6e7-5be6-975c-4a5cedbb76ba"},{"type":"user_defined_selection","id":"dc9ef425-3510-58db-948d-68af55a8a134"}]},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"}]},"postmortem":{"data":null},"integrations":{"data":[]}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "3152" + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:47 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:46 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - 0dpwUqkfQHWkgXeMRxMzd53GmXFItYtBrsUmywck00fH892lNzaBVoL155iIFepa + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "20" + X-Ratelimit-Period: + - "3600" + X-Ratelimit-Remaining: + - "19" + X-Ratelimit-Reset: + - "3554" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - ListIncidents + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "4969962405323860005" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "4462229472913174353" + url: https://api.datadoghq.com/api/v2/incidents + method: GET + response: + body: '{"meta":{"pagination":{"size":25,"next_offset":25,"offset":0}},"data":[{"type":"incidents","id":"85619ab5-e5e7-5397-aca6-e11938036ac6","attributes":{"public_id":232,"postmortem_id":null,"title":"go-TestScenarios-Feature_Incidents-Scenario_Get_a_list_of_incidents_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304845","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","created":"2020-11-13T22:00:46.085116+00:00","modified":"2020-11-13T22:00:46.085116+00:00","detected":"2020-11-13T22:00:46.083523+00:00","created_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null}},"severity":"UNKNOWN","state":"active","udf_values":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_field_selections":{"data":[{"type":"user_defined_selection","id":"c5b46a25-3fe4-5957-9ee6-99eeb45d33c6"},{"type":"user_defined_selection","id":"5cfcac74-e6e7-5be6-975c-4a5cedbb76ba"},{"type":"user_defined_selection","id":"dc9ef425-3510-58db-948d-68af55a8a134"}]},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"}]},"postmortem":{"data":null},"integrations":{"data":[]}}}]}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:47 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:47 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - 1KMr27QHAQHDfYPOMxdkaV+JBh/1ku8yD6KIlLr2d217iUuzksir9gh+Nfb7tVhq + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "100" + X-Ratelimit-Period: + - "60" + X-Ratelimit-Remaining: + - "99" + X-Ratelimit-Reset: + - "13" + status: 200 OK + code: 200 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_the_details_of_an_incident_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_the_details_of_an_incident_returns__OK__response.freeze new file mode 100644 index 00000000000..2c44985ac29 --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_the_details_of_an_incident_returns__OK__response.freeze @@ -0,0 +1 @@ +2020-11-13T16:00:52.012394-06:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_the_details_of_an_incident_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_the_details_of_an_incident_returns__OK__response.yaml new file mode 100644 index 00000000000..a1ebb14b4f7 --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Get_the_details_of_an_incident_returns__OK__response.yaml @@ -0,0 +1,124 @@ +--- +version: 1 +interactions: +- request: + body: | + {"data":{"attributes":{"customer_impacted":false,"title":"go-TestScenarios-Feature_Incidents-Scenario_Get_the_details_of_an_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304852"},"type":"incidents"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - CreateIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "2382213252803557729" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "8432885739041153036" + url: https://api.datadoghq.com/api/v2/incidents + method: POST + response: + body: '{"data":{"type":"incidents","id":"6d7521bd-37c1-5801-ae40-6dc605569298","attributes":{"public_id":235,"postmortem_id":null,"title":"go-TestScenarios-Feature_Incidents-Scenario_Get_the_details_of_an_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304852","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":null,"created":"2020-11-13T22:00:52.336706+00:00","modified":"2020-11-13T22:00:52.336706+00:00","commander":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"detected":"2020-11-13T22:00:52.334956+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":null,"creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null}},"severity":"UNKNOWN","state":"active","udf_values":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_field_selections":{"data":[{"type":"user_defined_selection","id":"034dbf2c-6aaf-5161-8b2d-15bf121d314c"},{"type":"user_defined_selection","id":"09be728d-03ac-5f8b-98c0-7f6a9a982a1c"},{"type":"user_defined_selection","id":"7ee04a30-c7b7-591c-afa8-df50771ddb29"}]},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"}]},"postmortem":{"data":null},"integrations":{"data":[]}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "3159" + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:53 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:52 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - jQnCQ800IM9+AhjSbgOLP1olAAN0Zx3e3JL4dG9omKhKnkmdw7EJe7yfXnjuT+74 + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "20" + X-Ratelimit-Period: + - "3600" + X-Ratelimit-Remaining: + - "16" + X-Ratelimit-Reset: + - "3548" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - GetIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "8496455506632616662" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "8432885739041153036" + url: https://api.datadoghq.com/api/v2/incidents/6d7521bd-37c1-5801-ae40-6dc605569298 + method: GET + response: + body: '{"data":{"type":"incidents","id":"6d7521bd-37c1-5801-ae40-6dc605569298","attributes":{"public_id":235,"postmortem_id":null,"title":"go-TestScenarios-Feature_Incidents-Scenario_Get_the_details_of_an_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304852","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","created":"2020-11-13T22:00:52.336706+00:00","modified":"2020-11-13T22:00:52.336706+00:00","detected":"2020-11-13T22:00:52.334956+00:00","created_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null}},"severity":"UNKNOWN","state":"active","udf_values":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_field_selections":{"data":[{"type":"user_defined_selection","id":"034dbf2c-6aaf-5161-8b2d-15bf121d314c"},{"type":"user_defined_selection","id":"09be728d-03ac-5f8b-98c0-7f6a9a982a1c"},{"type":"user_defined_selection","id":"7ee04a30-c7b7-591c-afa8-df50771ddb29"}]},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"}]},"postmortem":{"data":null},"integrations":{"data":[]}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:53 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:53 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - /0aUVUH/0B08LSgkH1j961ejfqRhimJkYAixzpnRf5lscmOFHWjl/leOQ3Mnfn7R + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "100" + X-Ratelimit-Period: + - "60" + X-Ratelimit-Remaining: + - "97" + X-Ratelimit-Reset: + - "7" + status: 200 OK + code: 200 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Update_an_existing_incident_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Update_an_existing_incident_returns__OK__response.freeze new file mode 100644 index 00000000000..748b1fd6fce --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Update_an_existing_incident_returns__OK__response.freeze @@ -0,0 +1 @@ +2020-11-13T16:00:53.710742-06:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Update_an_existing_incident_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Update_an_existing_incident_returns__OK__response.yaml new file mode 100644 index 00000000000..2e988d6da60 --- /dev/null +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Incidents/Scenario_Update_an_existing_incident_returns__OK__response.yaml @@ -0,0 +1,127 @@ +--- +version: 1 +interactions: +- request: + body: | + {"data":{"attributes":{"customer_impacted":false,"title":"go-TestScenarios-Feature_Incidents-Scenario_Update_an_existing_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304853"},"type":"incidents"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - CreateIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "4714015441750584717" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "1183810281392741789" + url: https://api.datadoghq.com/api/v2/incidents + method: POST + response: + body: '{"data":{"type":"incidents","id":"06e9bb3c-4d58-5d41-8c36-df9c86821c69","attributes":{"public_id":236,"postmortem_id":null,"title":"go-TestScenarios-Feature_Incidents-Scenario_Update_an_existing_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304853","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":null,"created":"2020-11-13T22:00:53.801882+00:00","modified":"2020-11-13T22:00:53.801882+00:00","commander":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"detected":"2020-11-13T22:00:53.800109+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":null,"creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null}},"severity":"UNKNOWN","state":"active","udf_values":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_field_selections":{"data":[{"type":"user_defined_selection","id":"e9d8fb08-31f7-5428-9538-c8014d1327eb"},{"type":"user_defined_selection","id":"3da42008-40dd-5297-b103-a0e127805630"},{"type":"user_defined_selection","id":"40664e9f-b409-5b44-835d-e24c030b16f1"}]},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"}]},"postmortem":{"data":null},"integrations":{"data":[]}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "3156" + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:54 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:53 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - hkXZRrnCTh2pkyHJgLo1+B5+sLp+RYzQrqT867R6UzDvqVGo8Av8yUCpaA0POidP + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "20" + X-Ratelimit-Period: + - "3600" + X-Ratelimit-Remaining: + - "15" + X-Ratelimit-Reset: + - "3547" + status: 201 Created + code: 201 + duration: "" +- request: + body: | + {"data":{"attributes":{"fields":{"state":{"type":"dropdown","value":"resolved"}},"title":"go-TestScenarios-Feature_Incidents-Scenario_Update_an_existing_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304853-updated"},"id":"06e9bb3c-4d58-5d41-8c36-df9c86821c69","type":"incidents"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + Dd-Operation-Id: + - UpdateIncident + User-Agent: + - datadog-api-client-go/1.0.0-beta.11 (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "4782194360470251822" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "1183810281392741789" + url: https://api.datadoghq.com/api/v2/incidents/06e9bb3c-4d58-5d41-8c36-df9c86821c69 + method: PATCH + response: + body: '{"data":{"type":"incidents","id":"06e9bb3c-4d58-5d41-8c36-df9c86821c69","attributes":{"public_id":236,"postmortem_id":null,"title":"go-TestScenarios-Feature_Incidents-Scenario_Update_an_existing_incident_returns__OK__response-And_there_is_a_valid__incident__in_the_system-local-1605304853-updated","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","created":"2020-11-13T22:00:53.801882+00:00","modified":"2020-11-13T22:00:55.200509+00:00","commander":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"detected":"2020-11-13T22:00:53.800109+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"resolved"},"services":{"type":"autocomplete","value":null}},"severity":"UNKNOWN","state":"resolved","udf_values":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_field_selections":{"data":[{"type":"user_defined_selection","id":"e9d8fb08-31f7-5428-9538-c8014d1327eb"},{"type":"user_defined_selection","id":"3da42008-40dd-5297-b103-a0e127805630"},{"type":"user_defined_selection","id":"40664e9f-b409-5b44-835d-e24c030b16f1"}]},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"}]},"postmortem":{"data":null},"integrations":{"data":[]}}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 13 Nov 2020 22:00:55 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 20-Nov-2020 22:00:55 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - SjSxykLY0gTr3VkJbxmjvoevebB2pxQifq0h5HklwYksG7/9u16HyBsdYlpi9mGW + X-Dd-Version: + - "35.3365914" + X-Frame-Options: + - SAMEORIGIN + X-Ratelimit-Limit: + - "100" + X-Ratelimit-Period: + - "60" + X-Ratelimit-Remaining: + - "99" + X-Ratelimit-Reset: + - "5" + status: 200 OK + code: 200 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Create_a_new_service_returns__CREATED__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Create_a_new_service_returns__CREATED__response.freeze index 7b6b262f155..5335841405c 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Create_a_new_service_returns__CREATED__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Create_a_new_service_returns__CREATED__response.freeze @@ -1 +1 @@ -2020-09-21T12:18:19.504664+02:00 \ No newline at end of file +2020-09-25T16:48:57.880363-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Create_a_new_service_returns__CREATED__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Create_a_new_service_returns__CREATED__response.yaml index 156fbc1a2a7..855e761955c 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Create_a_new_service_returns__CREATED__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Create_a_new_service_returns__CREATED__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-Feature_Services-Scenario_Create_a_new_service_returns__CREATED__response-local-1600683499"},"type":"services"}} + {"data":{"attributes":{"name":"go-Feature_Services-Scenario_Create_a_new_service_returns__CREATED__response-local-1601066937"},"type":"services"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "2277761801433430103" + - "1490055901088547168" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2753658054943178992" + - "6506649640635333773" url: https://api.datadoghq.com/api/v2/services method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"78da750b-1b8f-59fc-b5a3-8f9ba884db01","attributes":{"name":"go-Feature_Services-Scenario_Create_a_new_service_returns__CREATED__response-local-1600683499","created":"2020-09-21T10:18:19.612743+00:00","modified":"2020-09-21T10:18:19.612743+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"d7074593-f71b-5862-bd56-f9f8b78f9c6a","attributes":{"name":"go-Feature_Services-Scenario_Create_a_new_service_returns__CREATED__response-local-1601066937","created":"2020-09-25T20:48:57.938945+00:00","modified":"2020-09-25T20:48:57.938945+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,24 +34,75 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:21 GMT + - Fri, 25 Sep 2020 20:48:58 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:19 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:48:57 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - IEUzjgpnyUrp74lH2dqPweGXNQU7es3CY44HHPIdy7aSNeimMebMvcKCoCgyWWVx + - DRZWTHDeKolQqk6GEAFoSVDF1cV93C/z8xwO7umb9e0luQPYr8BUl8IXxXdpfaM5 X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created code: 201 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteService + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "8633201184916384951" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "6506649640635333773" + url: https://api.datadoghq.com/api/v2/services/d7074593-f71b-5862-bd56-f9f8b78f9c6a + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:48:58 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:48:58 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - CUBCyaoXY2JdeHi5oQm4sg9onCJMsjgVJ5jLk2ugM2iR7uz4Q+lvjzDdvtcYDFC3 + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Delete_an_existing_service_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Delete_an_existing_service_returns__OK__response.freeze index 5213c5872e9..c33d856180e 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Delete_an_existing_service_returns__OK__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Delete_an_existing_service_returns__OK__response.freeze @@ -1 +1 @@ -2020-09-21T12:18:21.487162+02:00 \ No newline at end of file +2020-09-25T16:48:58.531565-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Delete_an_existing_service_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Delete_an_existing_service_returns__OK__response.yaml index e7ed308ab7a..01467106fae 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Delete_an_existing_service_returns__OK__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Delete_an_existing_service_returns__OK__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Delete_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683501"},"type":"services"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Delete_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066938"},"type":"services"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "8526420223129324211" + - "3671746275595989366" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2255819824092915915" + - "5620138184225733963" url: https://api.datadoghq.com/api/v2/services method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"1b0fef8f-669f-521a-a821-df3441422f5c","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Delete_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683501","created":"2020-09-21T10:18:21.613833+00:00","modified":"2020-09-21T10:18:21.613833+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"7f83e63f-a508-5a25-8126-903a13c4115a","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Delete_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066938","created":"2020-09-25T20:48:58.622046+00:00","modified":"2020-09-25T20:48:58.622046+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,22 +34,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:21 GMT + - Fri, 25 Sep 2020 20:48:58 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:21 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:48:58 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - 4XEHrKCjPbSbs1iu1F78+tH4eaIPZCq+IGDoHN/GQcOsLq6w3Zzz7ZK1RqpTUzFS + - A4zC5dDmz3QSTWXoflmdTKsS5dpIBJJrn2zMHspFpRSdDDnIHcmGhVikJ7NEySaP X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created @@ -64,14 +64,14 @@ interactions: Dd-Operation-Id: - DeleteService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "6111811401423286693" + - "4900027743862996230" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2255819824092915915" - url: https://api.datadoghq.com/api/v2/services/1b0fef8f-669f-521a-a821-df3441422f5c + - "5620138184225733963" + url: https://api.datadoghq.com/api/v2/services/7f83e63f-a508-5a25-8126-903a13c4115a method: DELETE response: body: "" @@ -85,22 +85,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:21 GMT + - Fri, 25 Sep 2020 20:49:00 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:21 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:48:58 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - WMqkdiu/k4tYC8oJLm7ZFuFlnIXAYAXwOPQoxLtj7bgJQppYJErVkGl/2/O/+zpm + - vJlCdCjZjHKDWCQaZXaKHjefwu7Jotxr42UmWttwNlCEvibEd08wFg9UscwYl4z7 X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 204 No Content @@ -115,17 +115,17 @@ interactions: Dd-Operation-Id: - DeleteService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "9085566002208311990" + - "8373327817834779738" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2255819824092915915" - url: https://api.datadoghq.com/api/v2/services/1b0fef8f-669f-521a-a821-df3441422f5c + - "5620138184225733963" + url: https://api.datadoghq.com/api/v2/services/7f83e63f-a508-5a25-8126-903a13c4115a method: DELETE response: - body: '{"errors": ["service 1b0fef8f-669f-521a-a821-df3441422f5c not found"]}' + body: '{"errors": ["service 7f83e63f-a508-5a25-8126-903a13c4115a not found"]}' headers: Cache-Control: - no-cache @@ -134,7 +134,7 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:22 GMT + - Fri, 25 Sep 2020 20:49:00 GMT Dd-Pool: - dogweb Pragma: @@ -146,7 +146,7 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 404 Not Found diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_a_list_of_all_services_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_a_list_of_all_services_returns__OK__response.freeze index 60c07b19bdc..85ca75542cd 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_a_list_of_all_services_returns__OK__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_a_list_of_all_services_returns__OK__response.freeze @@ -1 +1 @@ -2020-09-21T12:18:18.734125+02:00 \ No newline at end of file +2020-09-25T16:48:55.190479-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_a_list_of_all_services_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_a_list_of_all_services_returns__OK__response.yaml index 4775e63f7c8..1b26028d7ac 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_a_list_of_all_services_returns__OK__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_a_list_of_all_services_returns__OK__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_a_list_of_all_services_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683498"},"type":"services"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_a_list_of_all_services_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066935"},"type":"services"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "4506422814550497030" + - "662019090505350196" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "1567065634272299299" + - "8643669199315581999" url: https://api.datadoghq.com/api/v2/services method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"d527684e-e4dc-5707-aba3-eafa6d9eb7c2","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_a_list_of_all_services_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683498","created":"2020-09-21T10:18:19.215587+00:00","modified":"2020-09-21T10:18:19.215587+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"c1bb6a6e-a33e-56cb-bf75-e7704c27014e","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_a_list_of_all_services_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066935","created":"2020-09-25T20:48:55.445552+00:00","modified":"2020-09-25T20:48:55.445552+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,22 +34,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:19 GMT + - Fri, 25 Sep 2020 20:48:55 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:19 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:48:55 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - FP8Y2ks6/+u/R8ikARtQQYvp9IVj9nSQPYtAt3WVuBjumgKP35t8vnUuGfeHdr64 + - WrTDvawKJxc/3XHcVO+oe9kLOi9bBLB0fyesfpZ4AlLEoPVyUvH7rJdlyTxrqyNg X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created @@ -62,19 +62,19 @@ interactions: Accept: - application/json Dd-Operation-Id: - - GetServices + - ListServices User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "3810860809025661283" + - "3374233948551475789" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "1567065634272299299" + - "8643669199315581999" url: https://api.datadoghq.com/api/v2/services method: GET response: - body: '{"meta":{"sort":"ASC","pagination":{"size":25,"next_offset":25,"offset":0}},"data":[{"type":"services","id":"4704e7ba-1a5c-50f3-bd59-2476cc9b4ec4","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_a_list_of_all_services_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683203","created":"2020-09-21T10:13:23.670494+00:00","modified":"2020-09-21T10:13:23.670494+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},{"type":"services","id":"a41ccb79-79d0-54cd-aa21-ebcb7d666ffe","attributes":{"name":"go-Feature_Services-Scenario_Create_a_new_service_returns__CREATED__response-local-1600683203","created":"2020-09-21T10:13:24.047509+00:00","modified":"2020-09-21T10:13:24.047509+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},{"type":"services","id":"fd341a51-3b84-5b5a-9bde-0c6b44588ddf","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_details_of_a_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683207","created":"2020-09-21T10:13:28.181614+00:00","modified":"2020-09-21T10:13:28.181614+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},{"type":"services","id":"aff61dd5-95ef-5b9b-9a39-755000e03078","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683209-updated","created":"2020-09-21T10:13:29.570682+00:00","modified":"2020-09-21T10:13:29.842463+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},{"type":"services","id":"d527684e-e4dc-5707-aba3-eafa6d9eb7c2","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_a_list_of_all_services_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683498","created":"2020-09-21T10:18:19.215587+00:00","modified":"2020-09-21T10:18:19.215587+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}]}' + body: '{"meta":{"sort":"ASC","pagination":{"size":1,"next_offset":1,"offset":0}},"data":[{"type":"services","id":"c1bb6a6e-a33e-56cb-bf75-e7704c27014e","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_a_list_of_all_services_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066935","created":"2020-09-25T20:48:55.445552+00:00","modified":"2020-09-25T20:48:55.445552+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}]}' headers: Cache-Control: - no-cache @@ -83,13 +83,13 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:19 GMT + - Fri, 25 Sep 2020 20:48:56 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:19 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:48:56 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -98,11 +98,62 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - JywPpt+4BVnbPdSe3Y1Brr4edpaGbhQEf1Cv7s/evHeASrfyUCmzDpnXMXyJJDQz + - amxMFAqiSVjNyNv9bH0oCnBEjAVk4yOIMrMQTyRWQ0WFa2JUcjQXHejBMO8Fj7RQ X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 200 OK code: 200 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteService + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "3793620090479586323" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "8643669199315581999" + url: https://api.datadoghq.com/api/v2/services/c1bb6a6e-a33e-56cb-bf75-e7704c27014e + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:48:57 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:48:56 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - rbGMi63XY6ETkPw9boG8yUDqogZ/1IN0Hh4Igu952urF41BH1CFuhykimklaERoh + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_details_of_a_service_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_details_of_a_service_returns__OK__response.freeze index 2c307a5f9cd..6bbe3527497 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_details_of_a_service_returns__OK__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_details_of_a_service_returns__OK__response.freeze @@ -1 +1 @@ -2020-09-21T12:18:22.182468+02:00 \ No newline at end of file +2020-09-25T16:49:00.678708-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_details_of_a_service_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_details_of_a_service_returns__OK__response.yaml index 22470ae4b7c..1300fc40337 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_details_of_a_service_returns__OK__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Get_details_of_a_service_returns__OK__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_details_of_a_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683502"},"type":"services"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_details_of_a_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066940"},"type":"services"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "5422121693332621211" + - "5784305786849665869" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "9044175866312680750" + - "8673337226263974854" url: https://api.datadoghq.com/api/v2/services method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"299144f3-aacb-5e87-adf6-6255ea1432e8","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_details_of_a_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683502","created":"2020-09-21T10:18:22.279622+00:00","modified":"2020-09-21T10:18:22.279622+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"69957ebe-54e2-5958-9c6c-172e00cf4e24","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_details_of_a_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066940","created":"2020-09-25T20:49:00.735410+00:00","modified":"2020-09-25T20:49:00.735410+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,22 +34,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:23 GMT + - Fri, 25 Sep 2020 20:49:00 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:22 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:49:00 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - gKyXo3ULf4VOW0DRCpK6x6wW7WjimdWLkpQ5lRR6vSBvVWmlphnibJv0tavEU2N8 + - TlObKNxJC6mRjORAptBjah7X7IZlZoWDhxDuIhUdNUMmnkpihyb67mpyYPwy4Xl5 X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created @@ -64,17 +64,17 @@ interactions: Dd-Operation-Id: - GetService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "981135319760515141" + - "3177561693870532089" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "9044175866312680750" - url: https://api.datadoghq.com/api/v2/services/299144f3-aacb-5e87-adf6-6255ea1432e8 + - "8673337226263974854" + url: https://api.datadoghq.com/api/v2/services/69957ebe-54e2-5958-9c6c-172e00cf4e24 method: GET response: - body: '{"data":{"type":"services","id":"299144f3-aacb-5e87-adf6-6255ea1432e8","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_details_of_a_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683502","created":"2020-09-21T10:18:22.279622+00:00","modified":"2020-09-21T10:18:22.279622+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"data":{"type":"services","id":"69957ebe-54e2-5958-9c6c-172e00cf4e24","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Get_details_of_a_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066940","created":"2020-09-25T20:49:00.735410+00:00","modified":"2020-09-25T20:49:00.735410+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -83,13 +83,13 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:23 GMT + - Fri, 25 Sep 2020 20:49:01 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:23 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:49:01 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -98,11 +98,62 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - +TTazL1HF8qoxYARkG/60PGoq8sbkYkmqeurNry46zV0aHqBZfUrKqxtiyo42NRf + - FP8Y2ks6/+u/R8ikARtQQYvp9IVj9nSQPYtAt3WVuBjumgKP35t8vnUuGfeHdr64 X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 200 OK code: 200 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteService + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "8444805650394375247" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "8673337226263974854" + url: https://api.datadoghq.com/api/v2/services/69957ebe-54e2-5958-9c6c-172e00cf4e24 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:49:01 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:49:01 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - 2V6J6bfi8Lp+2UjnPdTvcW5IjbRGxJrhStYZW/ACt/za6xfDiK/Y5IuDyUadsRtA + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Update_an_existing_service_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Update_an_existing_service_returns__OK__response.freeze index a35c3f63489..a2e2e3108ca 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Update_an_existing_service_returns__OK__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Update_an_existing_service_returns__OK__response.freeze @@ -1 +1 @@ -2020-09-21T12:18:23.306127+02:00 \ No newline at end of file +2020-09-25T16:49:01.706634-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Update_an_existing_service_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Update_an_existing_service_returns__OK__response.yaml index c044c6b903d..6d2b9e9a31b 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Update_an_existing_service_returns__OK__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Services/Scenario_Update_an_existing_service_returns__OK__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683503"},"type":"services"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066941"},"type":"services"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "8186058303089906575" + - "8656839380543717650" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "7470347684003415624" + - "3888804822235071029" url: https://api.datadoghq.com/api/v2/services method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"41bd89a8-33fd-50fa-933b-0ab8c34357f5","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683503","created":"2020-09-21T10:18:23.395552+00:00","modified":"2020-09-21T10:18:23.395552+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"7bbf5b83-7620-515c-9746-91a5c7515e94","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066941","created":"2020-09-25T20:49:01.769378+00:00","modified":"2020-09-25T20:49:01.769378+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,22 +34,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:23 GMT + - Fri, 25 Sep 2020 20:49:01 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:23 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:49:01 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - P6Akw3EF5CkRD9dRTLe+2D7FUH3E+plOtxsv0XR1d07sSAJOUbLe0N5LZ7Ruz6Fj + - gKyXo3ULf4VOW0DRCpK6x6wW7WjimdWLkpQ5lRR6vSBvVWmlphnibJv0tavEU2N8 X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created @@ -57,7 +57,7 @@ interactions: duration: "" - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683503-updated"},"id":"","type":"services"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066941-updated"},"id":"","type":"services"}} form: {} headers: Accept: @@ -67,17 +67,17 @@ interactions: Dd-Operation-Id: - UpdateService User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "1582256753562287971" + - "3111644470006182330" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "7470347684003415624" - url: https://api.datadoghq.com/api/v2/services/41bd89a8-33fd-50fa-933b-0ab8c34357f5 + - "3888804822235071029" + url: https://api.datadoghq.com/api/v2/services/7bbf5b83-7620-515c-9746-91a5c7515e94 method: PATCH response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"41bd89a8-33fd-50fa-933b-0ab8c34357f5","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1600683503-updated","created":"2020-09-21T10:18:23.395552+00:00","modified":"2020-09-21T10:18:23.627247+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"services","id":"7bbf5b83-7620-515c-9746-91a5c7515e94","attributes":{"name":"go-TestScenarios-Feature_Services-Scenario_Update_an_existing_service_returns__OK__response-Given_there_is_a_valid__service__in_the_system-local-1601066941-updated","created":"2020-09-25T20:49:01.769378+00:00","modified":"2020-09-25T20:49:01.913721+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -86,13 +86,13 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:23 GMT + - Fri, 25 Sep 2020 20:49:02 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:23 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:49:01 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -101,11 +101,62 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - jrdNt2QvGarP6yOsylH3GAxdMWXM4CYDKNbO7i0omswFkFozD11pdA/9Rp2czovd + - 0e2Tq/aa08wSuRoWDdF6eCwF8GPYPPLmf3Lxvgc5OscTNyr8D4p+ksnId5WnGnR4 X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 200 OK code: 200 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteService + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "3278304660097176511" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "3888804822235071029" + url: https://api.datadoghq.com/api/v2/services/7bbf5b83-7620-515c-9746-91a5c7515e94 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:49:04 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:49:02 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - 60y8fjrf9Lhu8NRmYggZaUH1GQDnKp7ho4emCLNdZoXJeU4a0zvnmPIF2dQ+VP/K + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Create_a_new_team_returns__CREATED__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Create_a_new_team_returns__CREATED__response.freeze index f704ecbfe5d..0493d98186c 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Create_a_new_team_returns__CREATED__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Create_a_new_team_returns__CREATED__response.freeze @@ -1 +1 @@ -2020-09-21T12:17:59.950884+02:00 \ No newline at end of file +2020-09-25T16:46:08.066646-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Create_a_new_team_returns__CREATED__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Create_a_new_team_returns__CREATED__response.yaml index 0b55f850ff5..56d94360ba9 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Create_a_new_team_returns__CREATED__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Create_a_new_team_returns__CREATED__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-Feature_Teams-Scenario_Create_a_new_team_returns__CREATED__response-local-1600683479"},"type":"teams"}} + {"data":{"attributes":{"name":"go-Feature_Teams-Scenario_Create_a_new_team_returns__CREATED__response-local-1601066768"},"type":"teams"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "962224416776974222" + - "213492866315613919" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "7879427571950012920" + - "1536353617709944289" url: https://api.datadoghq.com/api/v2/teams method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"92471702-9d95-5b0a-beb8-fe3189cf8e71","attributes":{"name":"go-Feature_Teams-Scenario_Create_a_new_team_returns__CREATED__response-local-1600683479","created":"2020-09-21T10:18:00.076642+00:00","modified":"2020-09-21T10:18:00.076642+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"489634f0-51d2-5fc4-83dd-bf64a49ec3cc","attributes":{"name":"go-Feature_Teams-Scenario_Create_a_new_team_returns__CREATED__response-local-1601066768","created":"2020-09-25T20:46:08.157563+00:00","modified":"2020-09-25T20:46:08.157563+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,24 +34,75 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:00 GMT + - Fri, 25 Sep 2020 20:46:08 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:00 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:08 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - gOE+aFCHWuxgDnurm/juvZNkjdmweNjl464qle0N/zRJcc4Hspd926ElnnqPP95G + - uJb7fuSDu6iXljQCoPn45fU8YYeT+x+yw2Q7czkcLp8QmqZJ0xH7Oi7cYVs2cz8W X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created code: 201 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteTeam + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "2486003618205226185" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "1536353617709944289" + url: https://api.datadoghq.com/api/v2/teams/489634f0-51d2-5fc4-83dd-bf64a49ec3cc + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:46:09 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:08 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - 8fXgGAAoNDkfuneKCnTnqB8DKjHLTs+9UWiAzHHQVcEGbAPX4uItc5+97fNEvGUG + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Delete_an_existing_team_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Delete_an_existing_team_returns__OK__response.freeze index 9fc37649e77..cea09012ef3 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Delete_an_existing_team_returns__OK__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Delete_an_existing_team_returns__OK__response.freeze @@ -1 +1 @@ -2020-09-21T12:18:00.2107+02:00 \ No newline at end of file +2020-09-25T16:46:09.459593-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Delete_an_existing_team_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Delete_an_existing_team_returns__OK__response.yaml index 438056bb363..4f4de0e4ea6 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Delete_an_existing_team_returns__OK__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Delete_an_existing_team_returns__OK__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Delete_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683480"},"type":"teams"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Delete_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066769"},"type":"teams"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "2086151458286264706" + - "445270906913909416" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "8713644376658391883" + - "4023009589266540634" url: https://api.datadoghq.com/api/v2/teams method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"e8b70dc9-0d4a-5149-add2-aca6333f3918","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Delete_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683480","created":"2020-09-21T10:18:00.320031+00:00","modified":"2020-09-21T10:18:00.320031+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"d30a1ace-6c7d-5235-af37-083ac0b06b26","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Delete_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066769","created":"2020-09-25T20:46:09.526488+00:00","modified":"2020-09-25T20:46:09.526488+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,22 +34,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:01 GMT + - Fri, 25 Sep 2020 20:46:11 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:00 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:09 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - gxfSlUtZJz4/cDPBxW1+YhseAnu5514ckuMWbI3rl8N4exeAZPF+KTE0BQhrBgSI + - 0xx9Vajt2z9Bjd3zEZxSq+HXBSiVDpVx3zcehHaUF6Rbof5oICp4xtQ5KAyASYVV X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created @@ -64,14 +64,14 @@ interactions: Dd-Operation-Id: - DeleteTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "1126737367938386311" + - "3756853995370512847" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "8713644376658391883" - url: https://api.datadoghq.com/api/v2/teams/e8b70dc9-0d4a-5149-add2-aca6333f3918 + - "4023009589266540634" + url: https://api.datadoghq.com/api/v2/teams/d30a1ace-6c7d-5235-af37-083ac0b06b26 method: DELETE response: body: "" @@ -85,22 +85,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:01 GMT + - Fri, 25 Sep 2020 20:46:11 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:01 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:11 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - g1JN5WIJ1Um2nWq9AQ7orHFBA37V3eIZYgeyDV/dLV8QtbkkvRVVIW0Fy1xXObzE + - JNmeA3l0ccOXtA8wh8DpQGSmyIQ4z3r0Sqn1W1sQHkMGKxYzMqf/DJpF1RAS+Dpy X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 204 No Content @@ -115,17 +115,17 @@ interactions: Dd-Operation-Id: - DeleteTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "5771179958294535054" + - "3522664188854349571" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "8713644376658391883" - url: https://api.datadoghq.com/api/v2/teams/e8b70dc9-0d4a-5149-add2-aca6333f3918 + - "4023009589266540634" + url: https://api.datadoghq.com/api/v2/teams/d30a1ace-6c7d-5235-af37-083ac0b06b26 method: DELETE response: - body: '{"errors": ["team e8b70dc9-0d4a-5149-add2-aca6333f3918 not found"]}' + body: '{"errors": ["team d30a1ace-6c7d-5235-af37-083ac0b06b26 not found"]}' headers: Cache-Control: - no-cache @@ -134,7 +134,7 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:01 GMT + - Fri, 25 Sep 2020 20:46:11 GMT Dd-Pool: - dogweb Pragma: @@ -146,7 +146,7 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 404 Not Found diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_a_list_of_all_teams_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_a_list_of_all_teams_returns__OK__response.freeze index 6556bb78357..d6fdfd0ba2b 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_a_list_of_all_teams_returns__OK__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_a_list_of_all_teams_returns__OK__response.freeze @@ -1 +1 @@ -2020-09-21T12:17:59.058188+02:00 \ No newline at end of file +2020-09-25T16:46:06.541301-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_a_list_of_all_teams_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_a_list_of_all_teams_returns__OK__response.yaml index 9b56e8366f6..6ee4aad3deb 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_a_list_of_all_teams_returns__OK__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_a_list_of_all_teams_returns__OK__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_a_list_of_all_teams_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683479"},"type":"teams"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_a_list_of_all_teams_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066766"},"type":"teams"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "7781983740983004003" + - "5876520408122493814" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "1548715238849665757" + - "1873874155492482640" url: https://api.datadoghq.com/api/v2/teams method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"0a024aec-ea74-5c1b-a9a4-4a437d8990c9","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_a_list_of_all_teams_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683479","created":"2020-09-21T10:17:59.628275+00:00","modified":"2020-09-21T10:17:59.628275+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"8b4593d3-954f-550a-8fa9-c7bf4c36932f","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_a_list_of_all_teams_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066766","created":"2020-09-25T20:46:06.853841+00:00","modified":"2020-09-25T20:46:06.853841+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,22 +34,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:17:59 GMT + - Fri, 25 Sep 2020 20:46:06 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:17:59 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:06 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - kS9NSnhl4uQ8VlOuLb8SB7TQURuCRIbRwHRx1a1SKX/xDGoogXWL0I8r2t0CM40K + - P6Akw3EF5CkRD9dRTLe+2D7FUH3E+plOtxsv0XR1d07sSAJOUbLe0N5LZ7Ruz6Fj X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created @@ -62,19 +62,19 @@ interactions: Accept: - application/json Dd-Operation-Id: - - GetTeams + - ListTeams User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "3481552852317222921" + - "2706134692403640379" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "1548715238849665757" + - "1873874155492482640" url: https://api.datadoghq.com/api/v2/teams method: GET response: - body: '{"meta":{"sort":"ASC","pagination":{"size":25,"next_offset":25,"offset":0}},"data":[{"type":"teams","id":"78983c57-d1a9-5650-9092-21da4da9cab8","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_a_list_of_all_teams_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683210","created":"2020-09-21T10:13:30.161761+00:00","modified":"2020-09-21T10:13:30.161761+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},{"type":"teams","id":"08f97ac9-c8a7-5b52-b351-579b23b689d5","attributes":{"name":"go-Feature_Teams-Scenario_Create_a_new_team_returns__CREATED__response-local-1600683210","created":"2020-09-21T10:13:30.537887+00:00","modified":"2020-09-21T10:13:30.537887+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},{"type":"teams","id":"118c44e0-ebcc-53c0-bddb-1103225eef3d","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_details_of_a_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683213","created":"2020-09-21T10:13:33.403719+00:00","modified":"2020-09-21T10:13:33.403719+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},{"type":"teams","id":"b97ca1ca-cf42-59ee-8e49-cdd5d56bd86b","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683215-updated","created":"2020-09-21T10:13:35.461832+00:00","modified":"2020-09-21T10:13:37.116212+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},{"type":"teams","id":"0a024aec-ea74-5c1b-a9a4-4a437d8990c9","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_a_list_of_all_teams_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683479","created":"2020-09-21T10:17:59.628275+00:00","modified":"2020-09-21T10:17:59.628275+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}]}' + body: '{"meta":{"sort":"ASC","pagination":{"size":1,"next_offset":1,"offset":0}},"data":[{"type":"teams","id":"8b4593d3-954f-550a-8fa9-c7bf4c36932f","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_a_list_of_all_teams_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066766","created":"2020-09-25T20:46:06.853841+00:00","modified":"2020-09-25T20:46:06.853841+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}]}' headers: Cache-Control: - no-cache @@ -83,13 +83,13 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:17:59 GMT + - Fri, 25 Sep 2020 20:46:06 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:17:59 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:06 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -98,11 +98,62 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - ZTMib3S/rZeXw/RhaeaehRILC7QJAaERfyf3m4/am8FN44e9rxbkPcmk4YzKBISj + - kQL0CnFxOqhC7/LGPn5tSXP5D7AwuI8M1SPDYQaonLUXe7hbVUblKeVruwbyjQml X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 200 OK code: 200 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteTeam + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "7883998849593724876" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "1873874155492482640" + url: https://api.datadoghq.com/api/v2/teams/8b4593d3-954f-550a-8fa9-c7bf4c36932f + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:46:08 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:07 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - 0uWdRml6qahBDARd1CJm6K1SN/TZRSfeTs10desnuzZPhCWC9tfQLSVfNbr08c6A + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_details_of_a_team_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_details_of_a_team_returns__OK__response.freeze index 581f70e42c4..37405e75e2f 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_details_of_a_team_returns__OK__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_details_of_a_team_returns__OK__response.freeze @@ -1 +1 @@ -2020-09-21T12:18:01.977101+02:00 \ No newline at end of file +2020-09-25T16:46:11.571133-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_details_of_a_team_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_details_of_a_team_returns__OK__response.yaml index 592af1820cc..fe4d82e03d4 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_details_of_a_team_returns__OK__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Get_details_of_a_team_returns__OK__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_details_of_a_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683481"},"type":"teams"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_details_of_a_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066771"},"type":"teams"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "2822421583610056359" + - "657272493413682127" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "5779869816185065992" + - "8130754328989980648" url: https://api.datadoghq.com/api/v2/teams method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"e165fbf9-c3f5-5311-b60a-bbf9d580d2b3","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_details_of_a_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683481","created":"2020-09-21T10:18:02.083373+00:00","modified":"2020-09-21T10:18:02.083373+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"ff358f0c-d999-586e-a597-ef08c9c8f077","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_details_of_a_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066771","created":"2020-09-25T20:46:11.651305+00:00","modified":"2020-09-25T20:46:11.651305+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,22 +34,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:02 GMT + - Fri, 25 Sep 2020 20:46:11 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:02 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:11 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - M827keIeHgZeqezhGzPP+Gd5GSRighH0alcGV+l2b9IPZcm0Qit9YxQBjvzL4SO1 + - 2NNUQsZpZeC5yOEHnEH8LSn5LhjKmDDM31iXmBawo7O6opYjviLgi+mfUoMNw5sj X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created @@ -64,17 +64,17 @@ interactions: Dd-Operation-Id: - GetTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "2710705036009164941" + - "4962800854557945525" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "5779869816185065992" - url: https://api.datadoghq.com/api/v2/teams/e165fbf9-c3f5-5311-b60a-bbf9d580d2b3 + - "8130754328989980648" + url: https://api.datadoghq.com/api/v2/teams/ff358f0c-d999-586e-a597-ef08c9c8f077 method: GET response: - body: '{"data":{"type":"teams","id":"e165fbf9-c3f5-5311-b60a-bbf9d580d2b3","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_details_of_a_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683481","created":"2020-09-21T10:18:02.083373+00:00","modified":"2020-09-21T10:18:02.083373+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"data":{"type":"teams","id":"ff358f0c-d999-586e-a597-ef08c9c8f077","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Get_details_of_a_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066771","created":"2020-09-25T20:46:11.651305+00:00","modified":"2020-09-25T20:46:11.651305+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -83,13 +83,13 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:02 GMT + - Fri, 25 Sep 2020 20:46:11 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:02 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:11 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -98,11 +98,62 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - Xzkwy3Lys2FRGID1+VD70Hwjf/R/QThkPMaRafobZsVEfAegjDigJz2X0I3L4s9r + - t3HUEZc5ir8lXNnqzkff2uqNehUi1czGcghjOPRgwaz4xZmG6O4HwEI6mdtgJV0i X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 200 OK code: 200 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteTeam + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "4413630927993984285" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "8130754328989980648" + url: https://api.datadoghq.com/api/v2/teams/ff358f0c-d999-586e-a597-ef08c9c8f077 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:46:12 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:11 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - RNjkldB/U7jBomuDwniiFl3adRN7VFY0k6iblOqPBlb/lnmtli0Xp6qAxW+GhOfn + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Update_an_existing_team_returns__OK__response.freeze b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Update_an_existing_team_returns__OK__response.freeze index 55700d9d90c..48f36d2f0c6 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Update_an_existing_team_returns__OK__response.freeze +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Update_an_existing_team_returns__OK__response.freeze @@ -1 +1 @@ -2020-09-21T12:18:02.374626+02:00 \ No newline at end of file +2020-09-25T16:46:12.73429-04:00 \ No newline at end of file diff --git a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Update_an_existing_team_returns__OK__response.yaml b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Update_an_existing_team_returns__OK__response.yaml index b2e7fa530d7..74d47369282 100644 --- a/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Update_an_existing_team_returns__OK__response.yaml +++ b/tests/api/v2/datadog/cassettes/TestScenarios/Feature_Teams/Scenario_Update_an_existing_team_returns__OK__response.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683482"},"type":"teams"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066772"},"type":"teams"}} form: {} headers: Accept: @@ -13,17 +13,17 @@ interactions: Dd-Operation-Id: - CreateTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "2931911969128135538" + - "1745952145642287604" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "5464743706821744491" + - "9023937240852609073" url: https://api.datadoghq.com/api/v2/teams method: POST response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"4e9e7273-0c62-5625-aad9-c505dfac32ac","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683482","created":"2020-09-21T10:18:02.529171+00:00","modified":"2020-09-21T10:18:02.529171+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"227b1797-50be-5075-8286-f63b689b6a9f","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066772","created":"2020-09-25T20:46:12.799023+00:00","modified":"2020-09-25T20:46:12.799023+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -34,22 +34,22 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:02 GMT + - Fri, 25 Sep 2020 20:46:14 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:02 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:12 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; X-Content-Type-Options: - nosniff X-Dd-Debug: - - 0uWdRml6qahBDARd1CJm6K1SN/TZRSfeTs10desnuzZPhCWC9tfQLSVfNbr08c6A + - WInJ5NoKnWsGfpc5/7O8IFkOGqBCSPXHlW+v7fDYTqv2rGTGsFEBI9cuh2tqdLoD X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 201 Created @@ -57,7 +57,7 @@ interactions: duration: "" - request: body: | - {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683482-updated"},"id":"","type":"teams"}} + {"data":{"attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066772-updated"},"id":"","type":"teams"}} form: {} headers: Accept: @@ -67,17 +67,17 @@ interactions: Dd-Operation-Id: - UpdateTeam User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.14.3; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) X-Datadog-Parent-Id: - - "388738853776751653" + - "5204240646519995134" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "5464743706821744491" - url: https://api.datadoghq.com/api/v2/teams/4e9e7273-0c62-5625-aad9-c505dfac32ac + - "9023937240852609073" + url: https://api.datadoghq.com/api/v2/teams/227b1797-50be-5075-8286-f63b689b6a9f method: PATCH response: - body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"4e9e7273-0c62-5625-aad9-c505dfac32ac","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1600683482-updated","created":"2020-09-21T10:18:02.529171+00:00","modified":"2020-09-21T10:18:03.125238+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' + body: '{"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"frog@datadoghq.com","created_at":"2019-10-02T08:15:39.795051+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}],"data":{"type":"teams","id":"227b1797-50be-5075-8286-f63b689b6a9f","attributes":{"name":"go-TestScenarios-Feature_Teams-Scenario_Update_an_existing_team_returns__OK__response-Given_there_is_a_valid__team__in_the_system-local-1601066772-updated","created":"2020-09-25T20:46:12.799023+00:00","modified":"2020-09-25T20:46:14.344847+00:00"},"relationships":{"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}}' headers: Cache-Control: - no-cache @@ -86,13 +86,13 @@ interactions: Content-Type: - application/json Date: - - Mon, 21 Sep 2020 10:18:03 GMT + - Fri, 25 Sep 2020 20:46:14 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Mon, 28-Sep-2020 10:18:03 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:14 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -101,11 +101,62 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - Y9+v2iJC/5twluKZH+Abk+sCd7+zW2qB+wWhdwPtTfzsXiAGXu1np/KJsw5b93OQ + - Et2YiqVRxti9EZo6Gk/yyRrgDmYxZuoE62JE6GLJjDYX0PgDmkmo9d4ASFrtRIDj X-Dd-Version: - - "35.3066091" + - "35.3093372" X-Frame-Options: - SAMEORIGIN status: 200 OK code: 200 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Dd-Operation-Id: + - DeleteTeam + User-Agent: + - datadog-api-client-go/1.0.0-beta.9+dev (go go1.15.2; os darwin; arch amd64) + X-Datadog-Parent-Id: + - "7882991764133393929" + X-Datadog-Sampling-Priority: + - "1" + X-Datadog-Trace-Id: + - "9023937240852609073" + url: https://api.datadoghq.com/api/v2/teams/227b1797-50be-5075-8286-f63b689b6a9f + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 25 Sep 2020 20:46:15 GMT + Dd-Pool: + - dogweb + Pragma: + - no-cache + Set-Cookie: + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Fri, 02-Oct-2020 20:46:14 GMT; + secure; HttpOnly + Strict-Transport-Security: + - max-age=15724800; + X-Content-Type-Options: + - nosniff + X-Dd-Debug: + - E8kYJH6Hb74I4gS4d8oTnZBbKR38RfM4isuhSW09hK2ARkJHcJxE0DNPxSd582jS + X-Dd-Version: + - "35.3093372" + X-Frame-Options: + - SAMEORIGIN + status: 204 No Content + code: 204 + duration: "" diff --git a/tests/api/v2/datadog/features/incidents.feature b/tests/api/v2/datadog/features/incidents.feature new file mode 100644 index 00000000000..3a761ca9682 --- /dev/null +++ b/tests/api/v2/datadog/features/incidents.feature @@ -0,0 +1,50 @@ +@endpoint(incidents) +Feature: Incidents + Manage incident response. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Incidents" API + + Scenario: Get a list of incidents returns "OK" response + Given operation "ListIncidents" enabled + And there is a valid "incident" in the system + And new "ListIncidents" request + When the request is sent + Then the response status is 200 OK + + Scenario: Create an incident returns "CREATED" response + Given there is a valid "user" in the system + And operation "CreateIncident" enabled + And new "CreateIncident" request + And body {"data": {"type": "incidents", "attributes": {"title": "{{unique}}", "customer_impacted": false, "fields": {"state": {"type": "dropdown", "value": "resolved"}}}, "relationships": {"commander": {"data": {"type": "{{ user.data.type }}", "id": "{{ user.data.id }}"}}}}} + When the request is sent + Then the response status is 201 CREATED + + Scenario: Delete an existing incident returns "OK" response + Given operation "DeleteIncident" enabled + And there is a valid "incident" in the system + And new "DeleteIncident" request + And request contains "incident_id" parameter from "incident.data.id" + When the request is sent + Then the response status is 204 OK + + Scenario: Get the details of an incident returns "OK" response + Given operation "GetIncident" enabled + And there is a valid "incident" in the system + And new "GetIncident" request + And request contains "incident_id" parameter from "incident.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.title" has the same value as "incident.data.attributes.title" + + Scenario: Update an existing incident returns "OK" response + Given operation "UpdateIncident" enabled + And there is a valid "incident" in the system + And new "UpdateIncident" request + And request contains "incident_id" parameter from "incident.data.id" + And body {"data": {"id": "{{incident.data.id}}", "type": "incidents", "attributes": {"fields": {"state": {"type": "dropdown", "value":"resolved"}}, "title": "{{ incident.data.attributes.title }}-updated"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.title" is equal to "{{ incident.data.attributes.title }}-updated" diff --git a/tests/api/v2/datadog/scenarios_test.go b/tests/api/v2/datadog/scenarios_test.go index 0509042260f..f8894c660b8 100644 --- a/tests/api/v2/datadog/scenarios_test.go +++ b/tests/api/v2/datadog/scenarios_test.go @@ -31,6 +31,12 @@ func undoCreateRole(ctx gobdd.Context) { Client(cctx).RolesApi.DeleteRole(cctx, role.Data.GetId()).Execute() } +func undoCreateIncident(ctx gobdd.Context) { + incident := tests.GetResponse(ctx)[0].Interface().(datadog.IncidentResponse) + cctx := tests.GetCtx(ctx) + Client(cctx).IncidentsApi.DeleteIncident(cctx, incident.Data.GetId()).Execute() +} + func undoCreateService(ctx gobdd.Context) { service := tests.GetResponse(ctx)[0].Interface().(datadog.IncidentServiceResponse) cctx := tests.GetCtx(ctx) @@ -48,19 +54,23 @@ var requestsUndo = map[string]func(ctx gobdd.Context){ "AddPermissionToRole": undoIgnore, "AddUserToRole": undoIgnore, "AggregateLogs": undoIgnore, + "CreateIncident": undoCreateIncident, "CreateIncidentService": undoCreateService, "CreateIncidentTeam": undoCreateTeam, "CreateRole": undoCreateRole, "CreateUser": undoCreateUser, + "DeleteIncident": undoIgnore, "DeleteIncidentService": undoIgnore, "DeleteIncidentTeam": undoIgnore, "DeleteRole": undoIgnore, "DisableUser": undoIgnore, + "GetIncident": undoIgnore, "GetIncidentService": undoIgnore, "GetIncidentTeam": undoIgnore, "GetInvitation": undoIgnore, "GetRole": undoIgnore, "GetUser": undoIgnore, + "ListIncidents": undoIgnore, "ListIncidentServices": undoIgnore, "ListIncidentTeams": undoIgnore, "ListLogs": undoIgnore, @@ -74,6 +84,7 @@ var requestsUndo = map[string]func(ctx gobdd.Context){ "RemovePermissionFromRole": undoIgnore, "RemoveUserFromRole": undoIgnore, "SendInvitations": undoIgnore, + "UpdateIncident": undoIgnore, "UpdateIncidentService": undoIgnore, "UpdateIncidentTeam": undoIgnore, "UpdateRole": undoIgnore, @@ -147,6 +158,7 @@ func TestScenarios(t *testing.T) { s.AddStep(`a valid "appKeyAuth" key in the system`, aValidAppKeyAuth) s.AddStep(`an instance of "([^"]+)" API`, anInstanceOf) s.AddStep(`operation "([^"]+)" enabled`, enableOperations) + s.AddStep(`there is a valid "incident" in the system`, incident) s.AddStep(`there is a valid "user" in the system`, user) s.AddStep(`there is a valid "role" in the system`, role) s.AddStep(`there is a valid "service" in the system`, service) @@ -316,6 +328,38 @@ func team(t gobdd.StepTest, ctx gobdd.Context) { tests.GetData(ctx)["team"] = response } +func deleteIncident(ctx context.Context, incidentID string) { + client := Client(ctx) + client.GetConfig().SetUnstableOperationEnabled("DeleteIncident", true) + + _, err := client.IncidentsApi.DeleteIncident(ctx, incidentID).Execute() + if err == nil { + return + } + log.Printf("Error deleting incident: %v, Another test may have already deleted this incident: %s", incidentID, err.Error()) +} + +func incident(t gobdd.StepTest, ctx gobdd.Context) { + client := Client(tests.GetCtx(ctx)) + client.GetConfig().SetUnstableOperationEnabled("CreateIncident", true) + + incidentAttributes := datadog.NewIncidentCreateAttributes(false, *tests.UniqueEntityName(tests.GetCtx(ctx), t.(*testing.T))) + incident := datadog.NewIncidentCreateData(*incidentAttributes, datadog.IncidentType("incidents")) + incidentRequest := datadog.NewIncidentCreateRequest(*incident) + response, _, err := client.IncidentsApi.CreateIncident(tests.GetCtx(ctx)).Body(*incidentRequest).Execute() + if err != nil { + t.Fatalf("error creating incident: response %s: %v", err.(datadog.GenericOpenAPIError).Body(), err) + } + + responseData := response.GetData() + incidentID := responseData.GetId() + outContext := tests.GetCtx(ctx) + tests.GetCleanup(ctx)["50-incident"] = func() { + deleteIncident(outContext, incidentID) + } + + tests.GetData(ctx)["incident"] = response +} func userHasRole(t gobdd.StepTest, ctx gobdd.Context) { client := Client(tests.GetCtx(ctx)) From 0982eedc1fb7be42ddb0be5f06703b40ef2d8a9e Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2020 09:31:43 +0100 Subject: [PATCH 2/2] Change event_query property to use log query definition in dashboard widgets (#573) * change event_query data source -> EventQueryDefinition to LogQueryDefinition add legacy_event_query data source -> LogQueryDefinition * remove deprecated widgets based on the old definition of `event_query`. Since the new `event_query` query definition is the same as log we don't need to add additional tests * add tests for event_query data source * Regenerate client from commit bea8b79 of spec repo Co-authored-by: MichaelTROEHLER Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +- api/v1/datadog/api/openapi.yaml | 16 +- api/v1/datadog/docs/ChangeWidgetRequest.md | 8 +- .../datadog/docs/DistributionWidgetRequest.md | 8 +- api/v1/datadog/docs/HostMapRequest.md | 8 +- .../datadog/docs/QueryValueWidgetRequest.md | 8 +- api/v1/datadog/docs/ScatterPlotRequest.md | 8 +- api/v1/datadog/docs/TableWidgetRequest.md | 8 +- .../datadog/docs/TimeseriesWidgetRequest.md | 8 +- api/v1/datadog/docs/ToplistWidgetRequest.md | 8 +- api/v1/datadog/model_change_widget_request.go | 18 +- .../model_distribution_widget_request.go | 12 +- api/v1/datadog/model_host_map_request.go | 12 +- .../model_query_value_widget_request.go | 12 +- api/v1/datadog/model_scatter_plot_request.go | 12 +- api/v1/datadog/model_table_widget_request.go | 12 +- .../model_timeseries_widget_request.go | 18 +- .../datadog/model_toplist_widget_request.go | 12 +- tests/api/v1/datadog/api_dashboards_test.go | 21 +- .../cassettes/TestDashboardLifecycle.freeze | 2 +- .../cassettes/TestDashboardLifecycle.yaml | 347 +++++++++--------- 21 files changed, 292 insertions(+), 274 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index ae90e752bd6..9206e887489 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.3.0", - "regenerated": "2020-11-17 16:22:27.031496", - "spec_repo_commit": "96d901b" + "regenerated": "2020-11-17 18:40:45.694224", + "spec_repo_commit": "bea8b79" }, "v2": { "apigentools_version": "1.3.0", - "regenerated": "2020-11-17 16:22:32.970149", - "spec_repo_commit": "96d901b" + "regenerated": "2020-11-17 18:40:51.132813", + "spec_repo_commit": "bea8b79" } } } \ No newline at end of file diff --git a/api/v1/datadog/api/openapi.yaml b/api/v1/datadog/api/openapi.yaml index 5151f7450ea..4840e5b28ef 100644 --- a/api/v1/datadog/api/openapi.yaml +++ b/api/v1/datadog/api/openapi.yaml @@ -7449,7 +7449,7 @@ components: compare_to: $ref: '#/components/schemas/WidgetCompareTo' event_query: - $ref: '#/components/schemas/EventQueryDefinition' + $ref: '#/components/schemas/LogQueryDefinition' increase_good: description: Whether to show increase as good. type: boolean @@ -7945,7 +7945,7 @@ components: apm_query: $ref: '#/components/schemas/LogQueryDefinition' event_query: - $ref: '#/components/schemas/EventQueryDefinition' + $ref: '#/components/schemas/LogQueryDefinition' log_query: $ref: '#/components/schemas/LogQueryDefinition' network_query: @@ -8897,7 +8897,7 @@ components: apm_query: $ref: '#/components/schemas/LogQueryDefinition' event_query: - $ref: '#/components/schemas/EventQueryDefinition' + $ref: '#/components/schemas/LogQueryDefinition' log_query: $ref: '#/components/schemas/LogQueryDefinition' network_query: @@ -11980,7 +11980,7 @@ components: $ref: '#/components/schemas/WidgetConditionalFormat' type: array event_query: - $ref: '#/components/schemas/EventQueryDefinition' + $ref: '#/components/schemas/LogQueryDefinition' log_query: $ref: '#/components/schemas/LogQueryDefinition' network_query: @@ -12571,7 +12571,7 @@ components: apm_query: $ref: '#/components/schemas/LogQueryDefinition' event_query: - $ref: '#/components/schemas/EventQueryDefinition' + $ref: '#/components/schemas/LogQueryDefinition' log_query: $ref: '#/components/schemas/LogQueryDefinition' network_query: @@ -15299,7 +15299,7 @@ components: $ref: '#/components/schemas/WidgetConditionalFormat' type: array event_query: - $ref: '#/components/schemas/EventQueryDefinition' + $ref: '#/components/schemas/LogQueryDefinition' limit: description: For metric queries, the number of lines to show in the table. Only one request should have this property. @@ -15428,7 +15428,7 @@ components: display_type: $ref: '#/components/schemas/WidgetDisplayType' event_query: - $ref: '#/components/schemas/EventQueryDefinition' + $ref: '#/components/schemas/LogQueryDefinition' log_query: $ref: '#/components/schemas/LogQueryDefinition' metadata: @@ -15511,7 +15511,7 @@ components: minItems: 1 type: array event_query: - $ref: '#/components/schemas/EventQueryDefinition' + $ref: '#/components/schemas/LogQueryDefinition' log_query: $ref: '#/components/schemas/LogQueryDefinition' network_query: diff --git a/api/v1/datadog/docs/ChangeWidgetRequest.md b/api/v1/datadog/docs/ChangeWidgetRequest.md index 031f2f5097a..693c2a2980b 100644 --- a/api/v1/datadog/docs/ChangeWidgetRequest.md +++ b/api/v1/datadog/docs/ChangeWidgetRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **ChangeType** | Pointer to [**WidgetChangeType**](WidgetChangeType.md) | | [optional] **CompareTo** | Pointer to [**WidgetCompareTo**](WidgetCompareTo.md) | | [optional] -**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional] +**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **IncreaseGood** | Pointer to **bool** | Whether to show increase as good. | [optional] **LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] @@ -115,20 +115,20 @@ HasCompareTo returns a boolean if a field has been set. ### GetEventQuery -`func (o *ChangeWidgetRequest) GetEventQuery() EventQueryDefinition` +`func (o *ChangeWidgetRequest) GetEventQuery() LogQueryDefinition` GetEventQuery returns the EventQuery field if non-nil, zero value otherwise. ### GetEventQueryOk -`func (o *ChangeWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)` +`func (o *ChangeWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)` GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEventQuery -`func (o *ChangeWidgetRequest) SetEventQuery(v EventQueryDefinition)` +`func (o *ChangeWidgetRequest) SetEventQuery(v LogQueryDefinition)` SetEventQuery sets EventQuery field to given value. diff --git a/api/v1/datadog/docs/DistributionWidgetRequest.md b/api/v1/datadog/docs/DistributionWidgetRequest.md index f5388db1a62..e37af2e5904 100644 --- a/api/v1/datadog/docs/DistributionWidgetRequest.md +++ b/api/v1/datadog/docs/DistributionWidgetRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] -**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional] +**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional] @@ -60,20 +60,20 @@ HasApmQuery returns a boolean if a field has been set. ### GetEventQuery -`func (o *DistributionWidgetRequest) GetEventQuery() EventQueryDefinition` +`func (o *DistributionWidgetRequest) GetEventQuery() LogQueryDefinition` GetEventQuery returns the EventQuery field if non-nil, zero value otherwise. ### GetEventQueryOk -`func (o *DistributionWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)` +`func (o *DistributionWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)` GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEventQuery -`func (o *DistributionWidgetRequest) SetEventQuery(v EventQueryDefinition)` +`func (o *DistributionWidgetRequest) SetEventQuery(v LogQueryDefinition)` SetEventQuery sets EventQuery field to given value. diff --git a/api/v1/datadog/docs/HostMapRequest.md b/api/v1/datadog/docs/HostMapRequest.md index 817ec3e7d49..01c2533dc55 100644 --- a/api/v1/datadog/docs/HostMapRequest.md +++ b/api/v1/datadog/docs/HostMapRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] -**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional] +**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional] @@ -59,20 +59,20 @@ HasApmQuery returns a boolean if a field has been set. ### GetEventQuery -`func (o *HostMapRequest) GetEventQuery() EventQueryDefinition` +`func (o *HostMapRequest) GetEventQuery() LogQueryDefinition` GetEventQuery returns the EventQuery field if non-nil, zero value otherwise. ### GetEventQueryOk -`func (o *HostMapRequest) GetEventQueryOk() (*EventQueryDefinition, bool)` +`func (o *HostMapRequest) GetEventQueryOk() (*LogQueryDefinition, bool)` GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEventQuery -`func (o *HostMapRequest) SetEventQuery(v EventQueryDefinition)` +`func (o *HostMapRequest) SetEventQuery(v LogQueryDefinition)` SetEventQuery sets EventQuery field to given value. diff --git a/api/v1/datadog/docs/QueryValueWidgetRequest.md b/api/v1/datadog/docs/QueryValueWidgetRequest.md index b4084e0ea16..7505f25af14 100644 --- a/api/v1/datadog/docs/QueryValueWidgetRequest.md +++ b/api/v1/datadog/docs/QueryValueWidgetRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Aggregator** | Pointer to [**WidgetAggregator**](WidgetAggregator.md) | | [optional] **ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **ConditionalFormats** | Pointer to [**[]WidgetConditionalFormat**](WidgetConditionalFormat.md) | List of conditional formats. | [optional] -**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional] +**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional] @@ -111,20 +111,20 @@ HasConditionalFormats returns a boolean if a field has been set. ### GetEventQuery -`func (o *QueryValueWidgetRequest) GetEventQuery() EventQueryDefinition` +`func (o *QueryValueWidgetRequest) GetEventQuery() LogQueryDefinition` GetEventQuery returns the EventQuery field if non-nil, zero value otherwise. ### GetEventQueryOk -`func (o *QueryValueWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)` +`func (o *QueryValueWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)` GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEventQuery -`func (o *QueryValueWidgetRequest) SetEventQuery(v EventQueryDefinition)` +`func (o *QueryValueWidgetRequest) SetEventQuery(v LogQueryDefinition)` SetEventQuery sets EventQuery field to given value. diff --git a/api/v1/datadog/docs/ScatterPlotRequest.md b/api/v1/datadog/docs/ScatterPlotRequest.md index ea7ab8e90f0..1701b087b28 100644 --- a/api/v1/datadog/docs/ScatterPlotRequest.md +++ b/api/v1/datadog/docs/ScatterPlotRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Aggregator** | Pointer to [**WidgetAggregator**](WidgetAggregator.md) | | [optional] **ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] -**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional] +**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional] @@ -85,20 +85,20 @@ HasApmQuery returns a boolean if a field has been set. ### GetEventQuery -`func (o *ScatterPlotRequest) GetEventQuery() EventQueryDefinition` +`func (o *ScatterPlotRequest) GetEventQuery() LogQueryDefinition` GetEventQuery returns the EventQuery field if non-nil, zero value otherwise. ### GetEventQueryOk -`func (o *ScatterPlotRequest) GetEventQueryOk() (*EventQueryDefinition, bool)` +`func (o *ScatterPlotRequest) GetEventQueryOk() (*LogQueryDefinition, bool)` GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEventQuery -`func (o *ScatterPlotRequest) SetEventQuery(v EventQueryDefinition)` +`func (o *ScatterPlotRequest) SetEventQuery(v LogQueryDefinition)` SetEventQuery sets EventQuery field to given value. diff --git a/api/v1/datadog/docs/TableWidgetRequest.md b/api/v1/datadog/docs/TableWidgetRequest.md index caf7e82453b..8f6b8149dce 100644 --- a/api/v1/datadog/docs/TableWidgetRequest.md +++ b/api/v1/datadog/docs/TableWidgetRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **ApmStatsQuery** | Pointer to [**ApmStatsQueryDefinition**](ApmStatsQueryDefinition.md) | | [optional] **CellDisplayMode** | Pointer to [**[]TableWidgetCellDisplayMode**](TableWidgetCellDisplayMode.md) | A list of display modes for each table cell. | [optional] **ConditionalFormats** | Pointer to [**[]WidgetConditionalFormat**](WidgetConditionalFormat.md) | List of conditional formats. | [optional] -**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional] +**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **Limit** | Pointer to **int64** | For metric queries, the number of lines to show in the table. Only one request should have this property. | [optional] **LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] @@ -191,20 +191,20 @@ HasConditionalFormats returns a boolean if a field has been set. ### GetEventQuery -`func (o *TableWidgetRequest) GetEventQuery() EventQueryDefinition` +`func (o *TableWidgetRequest) GetEventQuery() LogQueryDefinition` GetEventQuery returns the EventQuery field if non-nil, zero value otherwise. ### GetEventQueryOk -`func (o *TableWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)` +`func (o *TableWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)` GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEventQuery -`func (o *TableWidgetRequest) SetEventQuery(v EventQueryDefinition)` +`func (o *TableWidgetRequest) SetEventQuery(v LogQueryDefinition)` SetEventQuery sets EventQuery field to given value. diff --git a/api/v1/datadog/docs/TimeseriesWidgetRequest.md b/api/v1/datadog/docs/TimeseriesWidgetRequest.md index 34fc22e1153..2774d5ae708 100644 --- a/api/v1/datadog/docs/TimeseriesWidgetRequest.md +++ b/api/v1/datadog/docs/TimeseriesWidgetRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **DisplayType** | Pointer to [**WidgetDisplayType**](WidgetDisplayType.md) | | [optional] -**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional] +**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **Metadata** | Pointer to [**[]TimeseriesWidgetRequestMetadata**](TimeseriesWidgetRequest_metadata.md) | Used to define expression aliases. | [optional] **NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] @@ -88,20 +88,20 @@ HasDisplayType returns a boolean if a field has been set. ### GetEventQuery -`func (o *TimeseriesWidgetRequest) GetEventQuery() EventQueryDefinition` +`func (o *TimeseriesWidgetRequest) GetEventQuery() LogQueryDefinition` GetEventQuery returns the EventQuery field if non-nil, zero value otherwise. ### GetEventQueryOk -`func (o *TimeseriesWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)` +`func (o *TimeseriesWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)` GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEventQuery -`func (o *TimeseriesWidgetRequest) SetEventQuery(v EventQueryDefinition)` +`func (o *TimeseriesWidgetRequest) SetEventQuery(v LogQueryDefinition)` SetEventQuery sets EventQuery field to given value. diff --git a/api/v1/datadog/docs/ToplistWidgetRequest.md b/api/v1/datadog/docs/ToplistWidgetRequest.md index 50a032b734e..52bcf758df5 100644 --- a/api/v1/datadog/docs/ToplistWidgetRequest.md +++ b/api/v1/datadog/docs/ToplistWidgetRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ApmQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **ConditionalFormats** | Pointer to [**[]WidgetConditionalFormat**](WidgetConditionalFormat.md) | List of conditional formats. | [optional] -**EventQuery** | Pointer to [**EventQueryDefinition**](EventQueryDefinition.md) | | [optional] +**EventQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **LogQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **NetworkQuery** | Pointer to [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] **ProcessQuery** | Pointer to [**ProcessQueryDefinition**](ProcessQueryDefinition.md) | | [optional] @@ -86,20 +86,20 @@ HasConditionalFormats returns a boolean if a field has been set. ### GetEventQuery -`func (o *ToplistWidgetRequest) GetEventQuery() EventQueryDefinition` +`func (o *ToplistWidgetRequest) GetEventQuery() LogQueryDefinition` GetEventQuery returns the EventQuery field if non-nil, zero value otherwise. ### GetEventQueryOk -`func (o *ToplistWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool)` +`func (o *ToplistWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool)` GetEventQueryOk returns a tuple with the EventQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEventQuery -`func (o *ToplistWidgetRequest) SetEventQuery(v EventQueryDefinition)` +`func (o *ToplistWidgetRequest) SetEventQuery(v LogQueryDefinition)` SetEventQuery sets EventQuery field to given value. diff --git a/api/v1/datadog/model_change_widget_request.go b/api/v1/datadog/model_change_widget_request.go index 8fec8981256..d0d0ee35c54 100644 --- a/api/v1/datadog/model_change_widget_request.go +++ b/api/v1/datadog/model_change_widget_request.go @@ -14,10 +14,10 @@ import ( // ChangeWidgetRequest Updated change widget. type ChangeWidgetRequest struct { - ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` - ChangeType *WidgetChangeType `json:"change_type,omitempty"` - CompareTo *WidgetCompareTo `json:"compare_to,omitempty"` - EventQuery *EventQueryDefinition `json:"event_query,omitempty"` + ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` + ChangeType *WidgetChangeType `json:"change_type,omitempty"` + CompareTo *WidgetCompareTo `json:"compare_to,omitempty"` + EventQuery *LogQueryDefinition `json:"event_query,omitempty"` // Whether to show increase as good. IncreaseGood *bool `json:"increase_good,omitempty"` LogQuery *LogQueryDefinition `json:"log_query,omitempty"` @@ -147,9 +147,9 @@ func (o *ChangeWidgetRequest) SetCompareTo(v WidgetCompareTo) { } // GetEventQuery returns the EventQuery field value if set, zero value otherwise. -func (o *ChangeWidgetRequest) GetEventQuery() EventQueryDefinition { +func (o *ChangeWidgetRequest) GetEventQuery() LogQueryDefinition { if o == nil || o.EventQuery == nil { - var ret EventQueryDefinition + var ret LogQueryDefinition return ret } return *o.EventQuery @@ -157,7 +157,7 @@ func (o *ChangeWidgetRequest) GetEventQuery() EventQueryDefinition { // GetEventQueryOk returns a tuple with the EventQuery field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ChangeWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool) { +func (o *ChangeWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool) { if o == nil || o.EventQuery == nil { return nil, false } @@ -173,8 +173,8 @@ func (o *ChangeWidgetRequest) HasEventQuery() bool { return false } -// SetEventQuery gets a reference to the given EventQueryDefinition and assigns it to the EventQuery field. -func (o *ChangeWidgetRequest) SetEventQuery(v EventQueryDefinition) { +// SetEventQuery gets a reference to the given LogQueryDefinition and assigns it to the EventQuery field. +func (o *ChangeWidgetRequest) SetEventQuery(v LogQueryDefinition) { o.EventQuery = &v } diff --git a/api/v1/datadog/model_distribution_widget_request.go b/api/v1/datadog/model_distribution_widget_request.go index cafb24ed57b..450101b6656 100644 --- a/api/v1/datadog/model_distribution_widget_request.go +++ b/api/v1/datadog/model_distribution_widget_request.go @@ -15,7 +15,7 @@ import ( // DistributionWidgetRequest Updated distribution widget. type DistributionWidgetRequest struct { ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` - EventQuery *EventQueryDefinition `json:"event_query,omitempty"` + EventQuery *LogQueryDefinition `json:"event_query,omitempty"` LogQuery *LogQueryDefinition `json:"log_query,omitempty"` NetworkQuery *LogQueryDefinition `json:"network_query,omitempty"` ProcessQuery *ProcessQueryDefinition `json:"process_query,omitempty"` @@ -76,9 +76,9 @@ func (o *DistributionWidgetRequest) SetApmQuery(v LogQueryDefinition) { } // GetEventQuery returns the EventQuery field value if set, zero value otherwise. -func (o *DistributionWidgetRequest) GetEventQuery() EventQueryDefinition { +func (o *DistributionWidgetRequest) GetEventQuery() LogQueryDefinition { if o == nil || o.EventQuery == nil { - var ret EventQueryDefinition + var ret LogQueryDefinition return ret } return *o.EventQuery @@ -86,7 +86,7 @@ func (o *DistributionWidgetRequest) GetEventQuery() EventQueryDefinition { // GetEventQueryOk returns a tuple with the EventQuery field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DistributionWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool) { +func (o *DistributionWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool) { if o == nil || o.EventQuery == nil { return nil, false } @@ -102,8 +102,8 @@ func (o *DistributionWidgetRequest) HasEventQuery() bool { return false } -// SetEventQuery gets a reference to the given EventQueryDefinition and assigns it to the EventQuery field. -func (o *DistributionWidgetRequest) SetEventQuery(v EventQueryDefinition) { +// SetEventQuery gets a reference to the given LogQueryDefinition and assigns it to the EventQuery field. +func (o *DistributionWidgetRequest) SetEventQuery(v LogQueryDefinition) { o.EventQuery = &v } diff --git a/api/v1/datadog/model_host_map_request.go b/api/v1/datadog/model_host_map_request.go index 399ef2cdafe..23b658268df 100644 --- a/api/v1/datadog/model_host_map_request.go +++ b/api/v1/datadog/model_host_map_request.go @@ -15,7 +15,7 @@ import ( // HostMapRequest Updated host map. type HostMapRequest struct { ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` - EventQuery *EventQueryDefinition `json:"event_query,omitempty"` + EventQuery *LogQueryDefinition `json:"event_query,omitempty"` LogQuery *LogQueryDefinition `json:"log_query,omitempty"` NetworkQuery *LogQueryDefinition `json:"network_query,omitempty"` ProcessQuery *ProcessQueryDefinition `json:"process_query,omitempty"` @@ -75,9 +75,9 @@ func (o *HostMapRequest) SetApmQuery(v LogQueryDefinition) { } // GetEventQuery returns the EventQuery field value if set, zero value otherwise. -func (o *HostMapRequest) GetEventQuery() EventQueryDefinition { +func (o *HostMapRequest) GetEventQuery() LogQueryDefinition { if o == nil || o.EventQuery == nil { - var ret EventQueryDefinition + var ret LogQueryDefinition return ret } return *o.EventQuery @@ -85,7 +85,7 @@ func (o *HostMapRequest) GetEventQuery() EventQueryDefinition { // GetEventQueryOk returns a tuple with the EventQuery field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HostMapRequest) GetEventQueryOk() (*EventQueryDefinition, bool) { +func (o *HostMapRequest) GetEventQueryOk() (*LogQueryDefinition, bool) { if o == nil || o.EventQuery == nil { return nil, false } @@ -101,8 +101,8 @@ func (o *HostMapRequest) HasEventQuery() bool { return false } -// SetEventQuery gets a reference to the given EventQueryDefinition and assigns it to the EventQuery field. -func (o *HostMapRequest) SetEventQuery(v EventQueryDefinition) { +// SetEventQuery gets a reference to the given LogQueryDefinition and assigns it to the EventQuery field. +func (o *HostMapRequest) SetEventQuery(v LogQueryDefinition) { o.EventQuery = &v } diff --git a/api/v1/datadog/model_query_value_widget_request.go b/api/v1/datadog/model_query_value_widget_request.go index b39013f4a08..7e9be098028 100644 --- a/api/v1/datadog/model_query_value_widget_request.go +++ b/api/v1/datadog/model_query_value_widget_request.go @@ -18,7 +18,7 @@ type QueryValueWidgetRequest struct { ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` // List of conditional formats. ConditionalFormats *[]WidgetConditionalFormat `json:"conditional_formats,omitempty"` - EventQuery *EventQueryDefinition `json:"event_query,omitempty"` + EventQuery *LogQueryDefinition `json:"event_query,omitempty"` LogQuery *LogQueryDefinition `json:"log_query,omitempty"` NetworkQuery *LogQueryDefinition `json:"network_query,omitempty"` ProcessQuery *ProcessQueryDefinition `json:"process_query,omitempty"` @@ -142,9 +142,9 @@ func (o *QueryValueWidgetRequest) SetConditionalFormats(v []WidgetConditionalFor } // GetEventQuery returns the EventQuery field value if set, zero value otherwise. -func (o *QueryValueWidgetRequest) GetEventQuery() EventQueryDefinition { +func (o *QueryValueWidgetRequest) GetEventQuery() LogQueryDefinition { if o == nil || o.EventQuery == nil { - var ret EventQueryDefinition + var ret LogQueryDefinition return ret } return *o.EventQuery @@ -152,7 +152,7 @@ func (o *QueryValueWidgetRequest) GetEventQuery() EventQueryDefinition { // GetEventQueryOk returns a tuple with the EventQuery field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *QueryValueWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool) { +func (o *QueryValueWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool) { if o == nil || o.EventQuery == nil { return nil, false } @@ -168,8 +168,8 @@ func (o *QueryValueWidgetRequest) HasEventQuery() bool { return false } -// SetEventQuery gets a reference to the given EventQueryDefinition and assigns it to the EventQuery field. -func (o *QueryValueWidgetRequest) SetEventQuery(v EventQueryDefinition) { +// SetEventQuery gets a reference to the given LogQueryDefinition and assigns it to the EventQuery field. +func (o *QueryValueWidgetRequest) SetEventQuery(v LogQueryDefinition) { o.EventQuery = &v } diff --git a/api/v1/datadog/model_scatter_plot_request.go b/api/v1/datadog/model_scatter_plot_request.go index 281c00dbe91..89e3c3693f6 100644 --- a/api/v1/datadog/model_scatter_plot_request.go +++ b/api/v1/datadog/model_scatter_plot_request.go @@ -16,7 +16,7 @@ import ( type ScatterPlotRequest struct { Aggregator *WidgetAggregator `json:"aggregator,omitempty"` ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` - EventQuery *EventQueryDefinition `json:"event_query,omitempty"` + EventQuery *LogQueryDefinition `json:"event_query,omitempty"` LogQuery *LogQueryDefinition `json:"log_query,omitempty"` NetworkQuery *LogQueryDefinition `json:"network_query,omitempty"` ProcessQuery *ProcessQueryDefinition `json:"process_query,omitempty"` @@ -108,9 +108,9 @@ func (o *ScatterPlotRequest) SetApmQuery(v LogQueryDefinition) { } // GetEventQuery returns the EventQuery field value if set, zero value otherwise. -func (o *ScatterPlotRequest) GetEventQuery() EventQueryDefinition { +func (o *ScatterPlotRequest) GetEventQuery() LogQueryDefinition { if o == nil || o.EventQuery == nil { - var ret EventQueryDefinition + var ret LogQueryDefinition return ret } return *o.EventQuery @@ -118,7 +118,7 @@ func (o *ScatterPlotRequest) GetEventQuery() EventQueryDefinition { // GetEventQueryOk returns a tuple with the EventQuery field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ScatterPlotRequest) GetEventQueryOk() (*EventQueryDefinition, bool) { +func (o *ScatterPlotRequest) GetEventQueryOk() (*LogQueryDefinition, bool) { if o == nil || o.EventQuery == nil { return nil, false } @@ -134,8 +134,8 @@ func (o *ScatterPlotRequest) HasEventQuery() bool { return false } -// SetEventQuery gets a reference to the given EventQueryDefinition and assigns it to the EventQuery field. -func (o *ScatterPlotRequest) SetEventQuery(v EventQueryDefinition) { +// SetEventQuery gets a reference to the given LogQueryDefinition and assigns it to the EventQuery field. +func (o *ScatterPlotRequest) SetEventQuery(v LogQueryDefinition) { o.EventQuery = &v } diff --git a/api/v1/datadog/model_table_widget_request.go b/api/v1/datadog/model_table_widget_request.go index 79a9ad6368c..9f170b5288c 100644 --- a/api/v1/datadog/model_table_widget_request.go +++ b/api/v1/datadog/model_table_widget_request.go @@ -23,7 +23,7 @@ type TableWidgetRequest struct { CellDisplayMode *[]TableWidgetCellDisplayMode `json:"cell_display_mode,omitempty"` // List of conditional formats. ConditionalFormats *[]WidgetConditionalFormat `json:"conditional_formats,omitempty"` - EventQuery *EventQueryDefinition `json:"event_query,omitempty"` + EventQuery *LogQueryDefinition `json:"event_query,omitempty"` // For metric queries, the number of lines to show in the table. Only one request should have this property. Limit *int64 `json:"limit,omitempty"` LogQuery *LogQueryDefinition `json:"log_query,omitempty"` @@ -246,9 +246,9 @@ func (o *TableWidgetRequest) SetConditionalFormats(v []WidgetConditionalFormat) } // GetEventQuery returns the EventQuery field value if set, zero value otherwise. -func (o *TableWidgetRequest) GetEventQuery() EventQueryDefinition { +func (o *TableWidgetRequest) GetEventQuery() LogQueryDefinition { if o == nil || o.EventQuery == nil { - var ret EventQueryDefinition + var ret LogQueryDefinition return ret } return *o.EventQuery @@ -256,7 +256,7 @@ func (o *TableWidgetRequest) GetEventQuery() EventQueryDefinition { // GetEventQueryOk returns a tuple with the EventQuery field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TableWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool) { +func (o *TableWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool) { if o == nil || o.EventQuery == nil { return nil, false } @@ -272,8 +272,8 @@ func (o *TableWidgetRequest) HasEventQuery() bool { return false } -// SetEventQuery gets a reference to the given EventQueryDefinition and assigns it to the EventQuery field. -func (o *TableWidgetRequest) SetEventQuery(v EventQueryDefinition) { +// SetEventQuery gets a reference to the given LogQueryDefinition and assigns it to the EventQuery field. +func (o *TableWidgetRequest) SetEventQuery(v LogQueryDefinition) { o.EventQuery = &v } diff --git a/api/v1/datadog/model_timeseries_widget_request.go b/api/v1/datadog/model_timeseries_widget_request.go index 5b06b4d7713..2541e93b445 100644 --- a/api/v1/datadog/model_timeseries_widget_request.go +++ b/api/v1/datadog/model_timeseries_widget_request.go @@ -14,10 +14,10 @@ import ( // TimeseriesWidgetRequest Updated timeseries widget. type TimeseriesWidgetRequest struct { - ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` - DisplayType *WidgetDisplayType `json:"display_type,omitempty"` - EventQuery *EventQueryDefinition `json:"event_query,omitempty"` - LogQuery *LogQueryDefinition `json:"log_query,omitempty"` + ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` + DisplayType *WidgetDisplayType `json:"display_type,omitempty"` + EventQuery *LogQueryDefinition `json:"event_query,omitempty"` + LogQuery *LogQueryDefinition `json:"log_query,omitempty"` // Used to define expression aliases. Metadata *[]TimeseriesWidgetRequestMetadata `json:"metadata,omitempty"` NetworkQuery *LogQueryDefinition `json:"network_query,omitempty"` @@ -113,9 +113,9 @@ func (o *TimeseriesWidgetRequest) SetDisplayType(v WidgetDisplayType) { } // GetEventQuery returns the EventQuery field value if set, zero value otherwise. -func (o *TimeseriesWidgetRequest) GetEventQuery() EventQueryDefinition { +func (o *TimeseriesWidgetRequest) GetEventQuery() LogQueryDefinition { if o == nil || o.EventQuery == nil { - var ret EventQueryDefinition + var ret LogQueryDefinition return ret } return *o.EventQuery @@ -123,7 +123,7 @@ func (o *TimeseriesWidgetRequest) GetEventQuery() EventQueryDefinition { // GetEventQueryOk returns a tuple with the EventQuery field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TimeseriesWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool) { +func (o *TimeseriesWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool) { if o == nil || o.EventQuery == nil { return nil, false } @@ -139,8 +139,8 @@ func (o *TimeseriesWidgetRequest) HasEventQuery() bool { return false } -// SetEventQuery gets a reference to the given EventQueryDefinition and assigns it to the EventQuery field. -func (o *TimeseriesWidgetRequest) SetEventQuery(v EventQueryDefinition) { +// SetEventQuery gets a reference to the given LogQueryDefinition and assigns it to the EventQuery field. +func (o *TimeseriesWidgetRequest) SetEventQuery(v LogQueryDefinition) { o.EventQuery = &v } diff --git a/api/v1/datadog/model_toplist_widget_request.go b/api/v1/datadog/model_toplist_widget_request.go index ed8ed8350d9..23d1dc1cfd7 100644 --- a/api/v1/datadog/model_toplist_widget_request.go +++ b/api/v1/datadog/model_toplist_widget_request.go @@ -17,7 +17,7 @@ type ToplistWidgetRequest struct { ApmQuery *LogQueryDefinition `json:"apm_query,omitempty"` // List of conditional formats. ConditionalFormats *[]WidgetConditionalFormat `json:"conditional_formats,omitempty"` - EventQuery *EventQueryDefinition `json:"event_query,omitempty"` + EventQuery *LogQueryDefinition `json:"event_query,omitempty"` LogQuery *LogQueryDefinition `json:"log_query,omitempty"` NetworkQuery *LogQueryDefinition `json:"network_query,omitempty"` ProcessQuery *ProcessQueryDefinition `json:"process_query,omitempty"` @@ -110,9 +110,9 @@ func (o *ToplistWidgetRequest) SetConditionalFormats(v []WidgetConditionalFormat } // GetEventQuery returns the EventQuery field value if set, zero value otherwise. -func (o *ToplistWidgetRequest) GetEventQuery() EventQueryDefinition { +func (o *ToplistWidgetRequest) GetEventQuery() LogQueryDefinition { if o == nil || o.EventQuery == nil { - var ret EventQueryDefinition + var ret LogQueryDefinition return ret } return *o.EventQuery @@ -120,7 +120,7 @@ func (o *ToplistWidgetRequest) GetEventQuery() EventQueryDefinition { // GetEventQueryOk returns a tuple with the EventQuery field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ToplistWidgetRequest) GetEventQueryOk() (*EventQueryDefinition, bool) { +func (o *ToplistWidgetRequest) GetEventQueryOk() (*LogQueryDefinition, bool) { if o == nil || o.EventQuery == nil { return nil, false } @@ -136,8 +136,8 @@ func (o *ToplistWidgetRequest) HasEventQuery() bool { return false } -// SetEventQuery gets a reference to the given EventQueryDefinition and assigns it to the EventQuery field. -func (o *ToplistWidgetRequest) SetEventQuery(v EventQueryDefinition) { +// SetEventQuery gets a reference to the given LogQueryDefinition and assigns it to the EventQuery field. +func (o *ToplistWidgetRequest) SetEventQuery(v LogQueryDefinition) { o.EventQuery = &v } diff --git a/tests/api/v1/datadog/api_dashboards_test.go b/tests/api/v1/datadog/api_dashboards_test.go index 6501e46d2a1..2393a3f9a9b 100644 --- a/tests/api/v1/datadog/api_dashboards_test.go +++ b/tests/api/v1/datadog/api_dashboards_test.go @@ -575,7 +575,7 @@ func TestDashboardLifecycle(t *testing.T) { timeseriesWidgetProcessQuery := datadog.NewWidget(datadog.TimeseriesWidgetDefinitionAsWidgetDefinition(timeseriesWidgetDefinitionProcessQuery)) - // Timeseries Widget with Log query (APM/Log/Network/Rum share schemas, so only test one) + // Timeseries Widget with Log query (APM/Log/Network/Rum/Event share schemas, so only test one) timeseriesWidgetDefinitionLogQuery := datadog.NewTimeseriesWidgetDefinitionWithDefaults() timeseriesWidgetDefinitionLogQuery.SetRequests([]datadog.TimeseriesWidgetRequest{{ LogQuery: &datadog.LogQueryDefinition{ @@ -634,9 +634,22 @@ func TestDashboardLifecycle(t *testing.T) { // Timeseries Widget with Event query timeseriesWidgetDefinitionEventQuery := datadog.NewTimeseriesWidgetDefinitionWithDefaults() timeseriesWidgetDefinitionEventQuery.SetRequests([]datadog.TimeseriesWidgetRequest{{ - EventQuery: &datadog.EventQueryDefinition{ - Search: "Build failure", - TagsExecution: "build", + EventQuery: &datadog.LogQueryDefinition{ + Index: datadog.PtrString("*"), + Compute: &datadog.LogsQueryCompute{ + Aggregation: "count", + Facet: datadog.PtrString("host"), + Interval: datadog.PtrInt64(10), + }, + Search: &datadog.LogQueryDefinitionSearch{Query: "source:kubernetes"}, + GroupBy: &[]datadog.LogQueryDefinitionGroupBy{{ + Facet: "host", + Limit: datadog.PtrInt64(5), + Sort: &datadog.LogQueryDefinitionSort{ + Aggregation: "count", + Order: datadog.WIDGETSORT_ASCENDING, + }, + }}, }, Style: &datadog.WidgetRequestStyle{ Palette: datadog.PtrString("dog_classic"), diff --git a/tests/api/v1/datadog/cassettes/TestDashboardLifecycle.freeze b/tests/api/v1/datadog/cassettes/TestDashboardLifecycle.freeze index 27b495c2edb..ccc36fdc899 100644 --- a/tests/api/v1/datadog/cassettes/TestDashboardLifecycle.freeze +++ b/tests/api/v1/datadog/cassettes/TestDashboardLifecycle.freeze @@ -1 +1 @@ -2020-10-14T19:40:53.52616-04:00 \ No newline at end of file +2020-11-17T13:23:38.197913+01:00 \ No newline at end of file diff --git a/tests/api/v1/datadog/cassettes/TestDashboardLifecycle.yaml b/tests/api/v1/datadog/cassettes/TestDashboardLifecycle.yaml index 5e75a6cd798..94f02d80644 100644 --- a/tests/api/v1/datadog/cassettes/TestDashboardLifecycle.yaml +++ b/tests/api/v1/datadog/cassettes/TestDashboardLifecycle.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"description":"Make sure we don't have too many failed HTTP responses.","name":"go-TestDashboardLifecycle-local-1602718853","query":{"denominator":"sum:httpservice.hits{!code:3xx}.as_count()","numerator":"sum:httpservice.hits{code:2xx}.as_count()"},"tags":["app:httpd"],"thresholds":[{"target":95,"timeframe":"7d","warning":98}],"type":"metric"} + {"description":"Make sure we don't have too many failed HTTP responses.","name":"go-TestDashboardLifecycle-local-1605615818","query":{"denominator":"sum:httpservice.hits{!code:3xx}.as_count()","numerator":"sum:httpservice.hits{code:2xx}.as_count()"},"tags":["app:httpd"],"thresholds":[{"target":95,"timeframe":"7d","warning":98}],"type":"metric"} form: {} headers: Accept: @@ -13,18 +13,18 @@ interactions: Dd-Operation-Id: - CreateSLO User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "3531375920398308172" + - "7756882566743545264" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" + - "3643868371144386" url: https://api.datadoghq.com/api/v1/slo method: POST response: body: '{"data":[{"description":"Make sure we don''t have too many failed HTTP - responses.","monitor_tags":[],"creator":{"handle":"frog@datadoghq.com","name":null,"email":"frog@datadoghq.com"},"thresholds":[{"warning":98.0,"warning_display":"98.","target":95.0,"target_display":"95.","timeframe":"7d"}],"type_id":1,"query":{"denominator":"sum:httpservice.hits{!code:3xx}.as_count()","numerator":"sum:httpservice.hits{code:2xx}.as_count()"},"id":"278a378e82285dd98d34688ea57bb988","name":"go-TestDashboardLifecycle-local-1602718853","created_at":1602718853,"tags":["app:httpd"],"modified_at":1602718853,"type":"metric"}],"error":null}' + responses.","monitor_tags":[],"creator":{"handle":"frog@datadoghq.com","name":null,"email":"frog@datadoghq.com"},"thresholds":[{"warning":98.0,"warning_display":"98.","target":95.0,"target_display":"95.","timeframe":"7d"}],"type_id":1,"query":{"denominator":"sum:httpservice.hits{!code:3xx}.as_count()","numerator":"sum:httpservice.hits{code:2xx}.as_count()"},"id":"7fc5606f63325ba58f49e564bc7e53cc","name":"go-TestDashboardLifecycle-local-1605615818","created_at":1605615818,"tags":["app:httpd"],"modified_at":1605615818,"type":"metric"}],"error":null}' headers: Cache-Control: - no-cache @@ -33,13 +33,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:40:53 GMT + - Tue, 17 Nov 2020 12:23:38 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:40:53 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:38 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -48,9 +48,9 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - /AIuUBUzXheMzx1cvxhB+WjJEVZnNytkpRgIpTWZSwENaLk6ZqapvZetzfxbHHYM + - XhN3sROXhRtxvw2F+uRtJTWMwUQRYhDKBCNr1DfCqtzQgh490ZXtNSOhIx1TzG8K X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN X-Ratelimit-Limit: @@ -60,13 +60,13 @@ interactions: X-Ratelimit-Remaining: - "499" X-Ratelimit-Reset: - - "7" + - "22" status: 200 OK code: 200 duration: "" - request: body: | - {"description":"Test dashboard for Go client","is_read_only":false,"layout_type":"ordered","template_variable_presets":[{"name":"Test Preset","template_variables":[{"name":"test preset","value":"*"}]}],"template_variables":[{"default":"*","name":"test template var","prefix":"test-go"}],"title":"go-TestDashboardLifecycle-local-1602718853-ordered","widgets":[{"definition":{"alert_id":"1234","time":{"live_span":"15m"},"title":"Test Alert Graph Widget","title_align":"center","title_size":"16","type":"alert_graph","viz_type":"timeseries"}},{"definition":{"alert_id":"1234","precision":2,"text_align":"center","title":"Test Alert Value Widget","title_align":"right","title_size":"12","type":"alert_value","unit":"ms"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"change_type":"absolute","compare_to":"hour_before","increase_good":true,"order_by":"change","order_dir":"asc","q":"avg:system.load.1{*}","show_present":true}],"time":{"live_span":"15m"},"title":"Test Change Widget","title_align":"center","title_size":"16","type":"change"}},{"definition":{"check":"service_check.up","group":"*","group_by":["bar"],"grouping":"check","tags":["foo:bar"],"time":{"live_span":"15m"},"title":"Test Check Status Widget","title_align":"center","title_size":"16","type":"check_status"}},{"definition":{"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test Distribution Widget","title_align":"center","title_size":"16","type":"distribution"}},{"definition":{"layout_type":"ordered","title":"Test Group Widget","type":"group","widgets":[{"definition":{"content":"Test Note Inside Group","type":"note"}}]}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded","tags_execution":"tags"}],"legend_size":"4","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test Headmap Widget","title_align":"center","title_size":"16","type":"heatmap","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"group":["env:prod"],"no_group_hosts":true,"no_metric_hosts":true,"node_type":"container","requests":{"fill":{"q":"avg:system.load.1{*}"},"size":{"q":"avg:system.load.1{*}"}},"scope":["foo"],"style":{"fill_max":"100","fill_min":"0","palette":"dog_classic","palette_flip":true},"title":"Test HostMap Widget","title_align":"center","title_size":"16","type":"hostmap"}},{"definition":{"background_color":"blue","content":"Test Note Widget Example","font_size":"13","show_tick":true,"text_align":"center","tick_edge":"bottom","tick_pos":"4","type":"note"}},{"definition":{"autoscale":true,"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"custom_unit":"ns","precision":2,"requests":[{"aggregator":"avg","conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"q":"avg:system.load.1{*}"}],"text_align":"center","time":{"live_span":"15m"},"title":"Test Query Value Widget","title_align":"center","title_size":"16","type":"query_value"}},{"definition":{"color_by_groups":["env"],"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":{"x":{"aggregator":"avg","q":"avg:system.load.1{*}"},"y":{"aggregator":"avg","q":"avg:system.load.1{*}"}},"time":{"live_span":"15m"},"title":"Test ScatterPlot Widget","title_align":"center","title_size":"16","type":"scatterplot","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"show_error_budget":true,"slo_id":"278a378e82285dd98d34688ea57bb988","time_windows":["7d"],"title":"Test SLO Widget","title_align":"center","title_size":"16","type":"slo","view_mode":"both","view_type":"detail"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"filters":["*"],"service":"1234","title":"Test Service Map Widget","title_align":"center","title_size":"16","type":"servicemap"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"has_search_bar":"auto","requests":[{"aggregator":"avg","alias":"System Load","cell_display_mode":["number"],"conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"limit":50,"order":"asc","q":"avg:system.load.1{*}"}],"time":{"live_span":"15m"},"title":"Test Table Widget","title_align":"center","title_size":"16","type":"query_table"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"apm_stats_query":{"columns":[{"name":"baz"}],"env":"prod","name":"web","primary_tag":"foo:*","resource":"endpoint","row_type":"span","service":""}}],"time":{"live_span":"15m"},"title":"Test Table Widget with APM Stats Data","title_align":"center","title_size":"16","type":"query_table"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"q":"avg:system.load.1{*}","style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"label":"Widget Scale","max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"label":"Widget Scale","max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"process_query":{"filter_by":["account:test"],"limit":10,"metric":"process.stat.cpu.total_pct","search_by":"editor"},"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Process Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","log_query":{"compute":{"aggregation":"count","facet":"host","interval":10},"group_by":[{"facet":"host","limit":5,"sort":{"aggregation":"count","order":"asc"}}],"index":"main","search":{"query":"Error parsing"}},"metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Log Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","event_query":{"search":"Build failure","tags_execution":"build"},"metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Event Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"q":"avg:system.load.1{*}"}],"time":{"live_span":"15m"},"title":"Test Toplist Widget","title_align":"center","title_size":"16","type":"toplist"}}]} + {"description":"Test dashboard for Go client","is_read_only":false,"layout_type":"ordered","template_variable_presets":[{"name":"Test Preset","template_variables":[{"name":"test preset","value":"*"}]}],"template_variables":[{"default":"*","name":"test template var","prefix":"test-go"}],"title":"go-TestDashboardLifecycle-local-1605615818-ordered","widgets":[{"definition":{"alert_id":"1234","time":{"live_span":"15m"},"title":"Test Alert Graph Widget","title_align":"center","title_size":"16","type":"alert_graph","viz_type":"timeseries"}},{"definition":{"alert_id":"1234","precision":2,"text_align":"center","title":"Test Alert Value Widget","title_align":"right","title_size":"12","type":"alert_value","unit":"ms"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"change_type":"absolute","compare_to":"hour_before","increase_good":true,"order_by":"change","order_dir":"asc","q":"avg:system.load.1{*}","show_present":true}],"time":{"live_span":"15m"},"title":"Test Change Widget","title_align":"center","title_size":"16","type":"change"}},{"definition":{"check":"service_check.up","group":"*","group_by":["bar"],"grouping":"check","tags":["foo:bar"],"time":{"live_span":"15m"},"title":"Test Check Status Widget","title_align":"center","title_size":"16","type":"check_status"}},{"definition":{"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test Distribution Widget","title_align":"center","title_size":"16","type":"distribution"}},{"definition":{"layout_type":"ordered","title":"Test Group Widget","type":"group","widgets":[{"definition":{"content":"Test Note Inside Group","type":"note"}}]}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded","tags_execution":"tags"}],"legend_size":"4","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test Headmap Widget","title_align":"center","title_size":"16","type":"heatmap","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"group":["env:prod"],"no_group_hosts":true,"no_metric_hosts":true,"node_type":"container","requests":{"fill":{"q":"avg:system.load.1{*}"},"size":{"q":"avg:system.load.1{*}"}},"scope":["foo"],"style":{"fill_max":"100","fill_min":"0","palette":"dog_classic","palette_flip":true},"title":"Test HostMap Widget","title_align":"center","title_size":"16","type":"hostmap"}},{"definition":{"background_color":"blue","content":"Test Note Widget Example","font_size":"13","show_tick":true,"text_align":"center","tick_edge":"bottom","tick_pos":"4","type":"note"}},{"definition":{"autoscale":true,"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"custom_unit":"ns","precision":2,"requests":[{"aggregator":"avg","conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"q":"avg:system.load.1{*}"}],"text_align":"center","time":{"live_span":"15m"},"title":"Test Query Value Widget","title_align":"center","title_size":"16","type":"query_value"}},{"definition":{"color_by_groups":["env"],"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":{"x":{"aggregator":"avg","q":"avg:system.load.1{*}"},"y":{"aggregator":"avg","q":"avg:system.load.1{*}"}},"time":{"live_span":"15m"},"title":"Test ScatterPlot Widget","title_align":"center","title_size":"16","type":"scatterplot","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"show_error_budget":true,"slo_id":"7fc5606f63325ba58f49e564bc7e53cc","time_windows":["7d"],"title":"Test SLO Widget","title_align":"center","title_size":"16","type":"slo","view_mode":"both","view_type":"detail"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"filters":["*"],"service":"1234","title":"Test Service Map Widget","title_align":"center","title_size":"16","type":"servicemap"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"has_search_bar":"auto","requests":[{"aggregator":"avg","alias":"System Load","cell_display_mode":["number"],"conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"limit":50,"order":"asc","q":"avg:system.load.1{*}"}],"time":{"live_span":"15m"},"title":"Test Table Widget","title_align":"center","title_size":"16","type":"query_table"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"apm_stats_query":{"columns":[{"name":"baz"}],"env":"prod","name":"web","primary_tag":"foo:*","resource":"endpoint","row_type":"span","service":""}}],"time":{"live_span":"15m"},"title":"Test Table Widget with APM Stats Data","title_align":"center","title_size":"16","type":"query_table"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"q":"avg:system.load.1{*}","style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"label":"Widget Scale","max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"label":"Widget Scale","max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"process_query":{"filter_by":["account:test"],"limit":10,"metric":"process.stat.cpu.total_pct","search_by":"editor"},"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Process Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","log_query":{"compute":{"aggregation":"count","facet":"host","interval":10},"group_by":[{"facet":"host","limit":5,"sort":{"aggregation":"count","order":"asc"}}],"index":"main","search":{"query":"Error parsing"}},"metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Log Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","event_query":{"compute":{"aggregation":"count","facet":"host","interval":10},"group_by":[{"facet":"host","limit":5,"sort":{"aggregation":"count","order":"asc"}}],"index":"*","search":{"query":"source:kubernetes"}},"metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Event Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"q":"avg:system.load.1{*}"}],"time":{"live_span":"15m"},"title":"Test Toplist Widget","title_align":"center","title_size":"16","type":"toplist"}}]} form: {} headers: Accept: @@ -76,65 +76,64 @@ interactions: Dd-Operation-Id: - CreateDashboard User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "8766353929440070623" + - "8630476492568059124" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" + - "3643868371144386" url: https://api.datadoghq.com/api/v1/dashboard method: POST response: body: '{"notify_list":null,"description":"Test dashboard for Go client","author_name":null,"template_variable_presets":[{"template_variables":[{"name":"test preset","value":"*"}],"name":"Test Preset"}],"template_variables":[{"default":"*","prefix":"test-go","name":"test - template var"}],"is_read_only":false,"id":"hrr-t66-h8p","title":"go-TestDashboardLifecycle-local-1602718853-ordered","url":"/dashboard/hrr-t66-h8p/go-testdashboardlifecycle-local-1602718853-ordered","created_at":"2020-10-14T23:40:54.356111+00:00","modified_at":"2020-10-14T23:40:54.356111+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","viz_type":"timeseries","title":"Test - Alert Graph Widget","title_align":"center","alert_id":"1234","time":{"live_span":"15m"},"type":"alert_graph"},"id":13418034904214},{"definition":{"title_size":"12","title":"Test - Alert Value Widget","title_align":"right","text_align":"center","precision":2,"alert_id":"1234","type":"alert_value","unit":"ms"},"id":6456468862420574},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test Change Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"change_type":"absolute","order_dir":"asc","compare_to":"hour_before","q":"avg:system.load.1{*}","show_present":true,"increase_good":true,"order_by":"change"}],"type":"change"},"id":6390147675092972},{"definition":{"group":"*","title":"Test - Check Status Widget","title_align":"center","group_by":["bar"],"time":{"live_span":"15m"},"title_size":"16","type":"check_status","check":"service_check.up","tags":["foo:bar"],"grouping":"check"},"id":3978504045260075},{"definition":{"title_size":"16","title":"Test - Distribution Widget","title_align":"center","show_legend":true,"time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"type":"distribution"},"id":7144994194585635},{"definition":{"widgets":[{"definition":{"content":"Test - Note Inside Group","type":"note"},"id":4775893488161692}],"layout_type":"ordered","type":"group","title":"Test - Group Widget"},"id":6701196787634379},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + template var"}],"is_read_only":false,"id":"s9u-t2c-va7","title":"go-TestDashboardLifecycle-local-1605615818-ordered","url":"/dashboard/s9u-t2c-va7/go-testdashboardlifecycle-local-1605615818-ordered","created_at":"2020-11-17T12:23:39.524374+00:00","modified_at":"2020-11-17T12:23:39.524374+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","viz_type":"timeseries","title":"Test + Alert Graph Widget","title_align":"center","alert_id":"1234","time":{"live_span":"15m"},"type":"alert_graph"},"id":2494656914566285},{"definition":{"title_size":"12","title":"Test + Alert Value Widget","title_align":"right","text_align":"center","precision":2,"alert_id":"1234","type":"alert_value","unit":"ms"},"id":17017885552673},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test Change Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"change_type":"absolute","order_dir":"asc","compare_to":"hour_before","q":"avg:system.load.1{*}","show_present":true,"increase_good":true,"order_by":"change"}],"type":"change"},"id":3798080091902922},{"definition":{"group":"*","title":"Test + Check Status Widget","title_align":"center","group_by":["bar"],"time":{"live_span":"15m"},"title_size":"16","type":"check_status","check":"service_check.up","tags":["foo:bar"],"grouping":"check"},"id":2118702455038217},{"definition":{"title_size":"16","title":"Test + Distribution Widget","title_align":"center","show_legend":true,"time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"type":"distribution"},"id":3091567498297731},{"definition":{"widgets":[{"definition":{"content":"Test + Note Inside Group","type":"note"},"id":3915751390832684}],"layout_type":"ordered","type":"group","title":"Test + Group Widget"},"id":7135543837471899},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","events":[{"q":"Build succeeded","tags_execution":"tags"}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test - Headmap Widget","legend_size":"4","type":"heatmap","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}]},"id":6391062156306458},{"definition":{"style":{"fill_min":"0","fill_max":"100","palette":"dog_classic","palette_flip":true},"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test HostMap Widget","title_align":"center","node_type":"container","no_metric_hosts":true,"group":["env:prod"],"requests":{"size":{"q":"avg:system.load.1{*}"},"fill":{"q":"avg:system.load.1{*}"}},"no_group_hosts":true,"type":"hostmap","scope":["foo"]},"id":3426754341928951},{"definition":{"tick_pos":"4","font_size":"13","type":"note","tick_edge":"bottom","text_align":"center","content":"Test - Note Widget Example","show_tick":true,"background_color":"blue"},"id":6997204751528811},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"autoscale":true,"title":"Test Query Value Widget","title_align":"center","custom_unit":"ns","text_align":"center","precision":2,"time":{"live_span":"15m"},"title_size":"16","requests":[{"q":"avg:system.load.1{*}","aggregator":"avg","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"query_value"},"id":5241180832457894},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Headmap Widget","legend_size":"4","type":"heatmap","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}]},"id":8281476289014655},{"definition":{"style":{"fill_min":"0","fill_max":"100","palette":"dog_classic","palette_flip":true},"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test HostMap Widget","title_align":"center","node_type":"container","no_metric_hosts":true,"group":["env:prod"],"requests":{"size":{"q":"avg:system.load.1{*}"},"fill":{"q":"avg:system.load.1{*}"}},"no_group_hosts":true,"type":"hostmap","scope":["foo"]},"id":410396376772477},{"definition":{"tick_pos":"4","font_size":"13","type":"note","tick_edge":"bottom","text_align":"center","content":"Test + Note Widget Example","show_tick":true,"background_color":"blue"},"id":2494982829326050},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"autoscale":true,"title":"Test Query Value Widget","title_align":"center","custom_unit":"ns","text_align":"center","precision":2,"time":{"live_span":"15m"},"title_size":"16","requests":[{"q":"avg:system.load.1{*}","aggregator":"avg","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"query_value"},"id":8693563389907106},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","color_by_groups":["env"],"time":{"live_span":"15m"},"title":"Test - ScatterPlot Widget","requests":{"y":{"q":"avg:system.load.1{*}","aggregator":"avg"},"x":{"q":"avg:system.load.1{*}","aggregator":"avg"}},"type":"scatterplot"},"id":1020697593677992},{"definition":{"time_windows":["7d"],"title_size":"16","show_error_budget":true,"title":"Test - SLO Widget","title_align":"center","slo_id":"278a378e82285dd98d34688ea57bb988","view_mode":"both","view_type":"detail","type":"slo"},"id":1872404692575478},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + ScatterPlot Widget","requests":{"y":{"q":"avg:system.load.1{*}","aggregator":"avg"},"x":{"q":"avg:system.load.1{*}","aggregator":"avg"}},"type":"scatterplot"},"id":6631034916462724},{"definition":{"time_windows":["7d"],"title_size":"16","show_error_budget":true,"title":"Test + SLO Widget","title_align":"center","slo_id":"7fc5606f63325ba58f49e564bc7e53cc","view_mode":"both","view_type":"detail","type":"slo"},"id":3425707111102839},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","service":"1234","title":"Test Service - Map Widget","title_align":"center","filters":["*"],"type":"servicemap"},"id":7699935182310852},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Map Widget","title_align":"center","filters":["*"],"type":"servicemap"},"id":1520927252413017},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","title":"Test Table Widget","title_align":"center","has_search_bar":"auto","time":{"live_span":"15m"},"requests":[{"aggregator":"avg","cell_display_mode":["number"],"conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}],"q":"avg:system.load.1{*}","alias":"System - Load","limit":50,"order":"asc"}],"type":"query_table"},"id":7949592053747724},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Load","limit":50,"order":"asc"}],"type":"query_table"},"id":3463001540037627},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","title":"Test Table Widget with APM Stats - Data","title_align":"center","time":{"live_span":"15m"},"requests":[{"apm_stats_query":{"primary_tag":"foo:*","resource":"endpoint","name":"web","service":"","row_type":"span","env":"prod","columns":[{"name":"baz"}]}}],"type":"query_table"},"id":1132299243257913},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Data","title_align":"center","time":{"live_span":"15m"},"requests":[{"apm_stats_query":{"primary_tag":"foo:*","resource":"endpoint","name":"web","service":"","row_type":"span","env":"prod","columns":[{"name":"baz"}]}}],"type":"query_table"},"id":4573836826684352},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear","label":"Widget Scale"},"title_align":"center","right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear","label":"Widget Scale"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget","legend_size":"16","type":"timeseries","requests":[{"q":"avg:system.load.1{*}","on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"display_type":"line","metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":3860595258216825},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":594217531564555},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Process Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"process_query":{"search_by":"editor","metric":"process.stat.cpu.total_pct","limit":10,"filter_by":["account:test"]},"display_type":"line","metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":8135211889267025},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":4968311724019012},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Log Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"display_type":"line","log_query":{"index":"main","search":{"query":"Error parsing"},"group_by":[{"facet":"host","sort":{"aggregation":"count","order":"asc"},"limit":5}],"compute":{"facet":"host","interval":10,"aggregation":"count"}},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":3858770271856022},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":645744214395356},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test - Timeseries Widget with Event Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"event_query":{"search":"Build - failure","tags_execution":"build"},"display_type":"line","style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":7685823790565440},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test Toplist Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"toplist"},"id":3181718029292121}],"layout_type":"ordered"}' + Timeseries Widget with Event Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"event_query":{"index":"*","search":{"query":"source:kubernetes"},"group_by":[{"facet":"host","sort":{"aggregation":"count","order":"asc"},"limit":5}],"compute":{"facet":"host","interval":10,"aggregation":"count"}},"display_type":"line","style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased + metric"}]}]},"id":7267174871651991},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test Toplist Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"toplist"},"id":82434466672210}],"layout_type":"ordered"}' headers: Cache-Control: - no-cache @@ -143,13 +142,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:40:54 GMT + - Tue, 17 Nov 2020 12:23:39 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:40:53 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:39 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -158,9 +157,9 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - DMzWnlnvmcVWit+nOzgpRgMecUZPFvENKg8LkKYn4Tsj68gJTKm0BuKxCJH0FFN4 + - AqBVHmyy+L9zrCUEAQ2Jd2pwskksgC+7nOsWqbNjcjcM+9M/ChipUo2OR6Q8oPwE X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN status: 200 OK @@ -175,65 +174,64 @@ interactions: Dd-Operation-Id: - GetDashboard User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "978564893585620171" + - "4724182657837718140" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" - url: https://api.datadoghq.com/api/v1/dashboard/hrr-t66-h8p + - "3643868371144386" + url: https://api.datadoghq.com/api/v1/dashboard/s9u-t2c-va7 method: GET response: body: '{"notify_list":null,"description":"Test dashboard for Go client","author_name":null,"template_variable_presets":[{"template_variables":[{"name":"test preset","value":"*"}],"name":"Test Preset"}],"template_variables":[{"default":"*","prefix":"test-go","name":"test - template var"}],"is_read_only":false,"id":"hrr-t66-h8p","title":"go-TestDashboardLifecycle-local-1602718853-ordered","url":"/dashboard/hrr-t66-h8p/go-testdashboardlifecycle-local-1602718853-ordered","created_at":"2020-10-14T23:40:54.356111+00:00","modified_at":"2020-10-14T23:40:54.356111+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","viz_type":"timeseries","title":"Test - Alert Graph Widget","title_align":"center","alert_id":"1234","time":{"live_span":"15m"},"type":"alert_graph"},"id":13418034904214},{"definition":{"title_size":"12","title":"Test - Alert Value Widget","title_align":"right","text_align":"center","precision":2,"alert_id":"1234","type":"alert_value","unit":"ms"},"id":6456468862420574},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test Change Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"change_type":"absolute","order_dir":"asc","compare_to":"hour_before","q":"avg:system.load.1{*}","show_present":true,"increase_good":true,"order_by":"change"}],"type":"change"},"id":6390147675092972},{"definition":{"group":"*","title":"Test - Check Status Widget","title_align":"center","group_by":["bar"],"time":{"live_span":"15m"},"title_size":"16","type":"check_status","check":"service_check.up","tags":["foo:bar"],"grouping":"check"},"id":3978504045260075},{"definition":{"title_size":"16","title":"Test - Distribution Widget","title_align":"center","show_legend":true,"time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"type":"distribution"},"id":7144994194585635},{"definition":{"widgets":[{"definition":{"content":"Test - Note Inside Group","type":"note"},"id":4775893488161692}],"layout_type":"ordered","type":"group","title":"Test - Group Widget"},"id":6701196787634379},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + template var"}],"is_read_only":false,"id":"s9u-t2c-va7","title":"go-TestDashboardLifecycle-local-1605615818-ordered","url":"/dashboard/s9u-t2c-va7/go-testdashboardlifecycle-local-1605615818-ordered","created_at":"2020-11-17T12:23:39.524374+00:00","modified_at":"2020-11-17T12:23:39.524374+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","viz_type":"timeseries","title":"Test + Alert Graph Widget","title_align":"center","alert_id":"1234","time":{"live_span":"15m"},"type":"alert_graph"},"id":2494656914566285},{"definition":{"title_size":"12","title":"Test + Alert Value Widget","title_align":"right","text_align":"center","precision":2,"alert_id":"1234","type":"alert_value","unit":"ms"},"id":17017885552673},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test Change Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"change_type":"absolute","order_dir":"asc","compare_to":"hour_before","q":"avg:system.load.1{*}","show_present":true,"increase_good":true,"order_by":"change"}],"type":"change"},"id":3798080091902922},{"definition":{"group":"*","title":"Test + Check Status Widget","title_align":"center","group_by":["bar"],"time":{"live_span":"15m"},"title_size":"16","type":"check_status","check":"service_check.up","tags":["foo:bar"],"grouping":"check"},"id":2118702455038217},{"definition":{"title_size":"16","title":"Test + Distribution Widget","title_align":"center","show_legend":true,"time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"type":"distribution"},"id":3091567498297731},{"definition":{"widgets":[{"definition":{"content":"Test + Note Inside Group","type":"note"},"id":3915751390832684}],"layout_type":"ordered","type":"group","title":"Test + Group Widget"},"id":7135543837471899},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","events":[{"q":"Build succeeded","tags_execution":"tags"}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test - Headmap Widget","legend_size":"4","type":"heatmap","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}]},"id":6391062156306458},{"definition":{"style":{"fill_min":"0","fill_max":"100","palette":"dog_classic","palette_flip":true},"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test HostMap Widget","title_align":"center","node_type":"container","no_metric_hosts":true,"group":["env:prod"],"requests":{"size":{"q":"avg:system.load.1{*}"},"fill":{"q":"avg:system.load.1{*}"}},"no_group_hosts":true,"type":"hostmap","scope":["foo"]},"id":3426754341928951},{"definition":{"tick_pos":"4","font_size":"13","type":"note","tick_edge":"bottom","text_align":"center","content":"Test - Note Widget Example","show_tick":true,"background_color":"blue"},"id":6997204751528811},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"autoscale":true,"title":"Test Query Value Widget","title_align":"center","custom_unit":"ns","text_align":"center","precision":2,"time":{"live_span":"15m"},"title_size":"16","requests":[{"q":"avg:system.load.1{*}","aggregator":"avg","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"query_value"},"id":5241180832457894},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Headmap Widget","legend_size":"4","type":"heatmap","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}]},"id":8281476289014655},{"definition":{"style":{"fill_min":"0","fill_max":"100","palette":"dog_classic","palette_flip":true},"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test HostMap Widget","title_align":"center","node_type":"container","no_metric_hosts":true,"group":["env:prod"],"requests":{"size":{"q":"avg:system.load.1{*}"},"fill":{"q":"avg:system.load.1{*}"}},"no_group_hosts":true,"type":"hostmap","scope":["foo"]},"id":410396376772477},{"definition":{"tick_pos":"4","font_size":"13","type":"note","tick_edge":"bottom","text_align":"center","content":"Test + Note Widget Example","show_tick":true,"background_color":"blue"},"id":2494982829326050},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"autoscale":true,"title":"Test Query Value Widget","title_align":"center","custom_unit":"ns","text_align":"center","precision":2,"time":{"live_span":"15m"},"title_size":"16","requests":[{"q":"avg:system.load.1{*}","aggregator":"avg","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"query_value"},"id":8693563389907106},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","color_by_groups":["env"],"time":{"live_span":"15m"},"title":"Test - ScatterPlot Widget","requests":{"y":{"q":"avg:system.load.1{*}","aggregator":"avg"},"x":{"q":"avg:system.load.1{*}","aggregator":"avg"}},"type":"scatterplot"},"id":1020697593677992},{"definition":{"time_windows":["7d"],"title_size":"16","show_error_budget":true,"title":"Test - SLO Widget","title_align":"center","slo_id":"278a378e82285dd98d34688ea57bb988","view_mode":"both","view_type":"detail","type":"slo"},"id":1872404692575478},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + ScatterPlot Widget","requests":{"y":{"q":"avg:system.load.1{*}","aggregator":"avg"},"x":{"q":"avg:system.load.1{*}","aggregator":"avg"}},"type":"scatterplot"},"id":6631034916462724},{"definition":{"time_windows":["7d"],"title_size":"16","show_error_budget":true,"title":"Test + SLO Widget","title_align":"center","slo_id":"7fc5606f63325ba58f49e564bc7e53cc","view_mode":"both","view_type":"detail","type":"slo"},"id":3425707111102839},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","service":"1234","title":"Test Service - Map Widget","title_align":"center","filters":["*"],"type":"servicemap"},"id":7699935182310852},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Map Widget","title_align":"center","filters":["*"],"type":"servicemap"},"id":1520927252413017},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","title":"Test Table Widget","title_align":"center","has_search_bar":"auto","time":{"live_span":"15m"},"requests":[{"aggregator":"avg","cell_display_mode":["number"],"conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}],"q":"avg:system.load.1{*}","alias":"System - Load","limit":50,"order":"asc"}],"type":"query_table"},"id":7949592053747724},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Load","limit":50,"order":"asc"}],"type":"query_table"},"id":3463001540037627},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","title":"Test Table Widget with APM Stats - Data","title_align":"center","time":{"live_span":"15m"},"requests":[{"apm_stats_query":{"primary_tag":"foo:*","resource":"endpoint","name":"web","service":"","row_type":"span","env":"prod","columns":[{"name":"baz"}]}}],"type":"query_table"},"id":1132299243257913},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Data","title_align":"center","time":{"live_span":"15m"},"requests":[{"apm_stats_query":{"primary_tag":"foo:*","resource":"endpoint","name":"web","service":"","row_type":"span","env":"prod","columns":[{"name":"baz"}]}}],"type":"query_table"},"id":4573836826684352},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear","label":"Widget Scale"},"title_align":"center","right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear","label":"Widget Scale"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget","legend_size":"16","type":"timeseries","requests":[{"q":"avg:system.load.1{*}","on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"display_type":"line","metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":3860595258216825},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":594217531564555},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Process Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"process_query":{"search_by":"editor","metric":"process.stat.cpu.total_pct","limit":10,"filter_by":["account:test"]},"display_type":"line","metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":8135211889267025},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":4968311724019012},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Log Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"display_type":"line","log_query":{"index":"main","search":{"query":"Error parsing"},"group_by":[{"facet":"host","sort":{"aggregation":"count","order":"asc"},"limit":5}],"compute":{"facet":"host","interval":10,"aggregation":"count"}},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":3858770271856022},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":645744214395356},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test - Timeseries Widget with Event Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"event_query":{"search":"Build - failure","tags_execution":"build"},"display_type":"line","style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":7685823790565440},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test Toplist Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"toplist"},"id":3181718029292121}],"layout_type":"ordered"}' + Timeseries Widget with Event Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"event_query":{"index":"*","search":{"query":"source:kubernetes"},"group_by":[{"facet":"host","sort":{"aggregation":"count","order":"asc"},"limit":5}],"compute":{"facet":"host","interval":10,"aggregation":"count"}},"display_type":"line","style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased + metric"}]}]},"id":7267174871651991},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test Toplist Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"toplist"},"id":82434466672210}],"layout_type":"ordered"}' headers: Cache-Control: - no-cache @@ -242,13 +240,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:40:54 GMT + - Tue, 17 Nov 2020 12:23:39 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:40:54 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:39 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -257,9 +255,9 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - FP8Y2ks6/+u/R8ikARtQQYvp9IVj9nSQPYtAt3WVuBjumgKP35t8vnUuGfeHdr64 + - n9uz1T+WujhmfsGndIdy1tCYb5bh9AzSyYOT5TTjJX23RGEavHxGqcz400IC+bY1 X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN status: 200 OK @@ -267,7 +265,7 @@ interactions: duration: "" - request: body: | - {"description":"Test Free layout dashboard for Go client","is_read_only":false,"layout_type":"free","template_variables":[{"default":"*","name":"test template var","prefix":"test-go"}],"title":"go-TestDashboardLifecycle-local-1602718853-free","widgets":[{"definition":{"event_size":"l","query":"Build successful","time":{"live_span":"1d"},"title":"Test Event Stream Widget","title_align":"center","title_size":"16","type":"event_stream"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"query":"Build Failed","time":{"live_span":"1mo"},"title":"Test Event Timeline Widget","title_align":"left","title_size":"16","type":"event_timeline"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"color":"blue","font_size":"16","text":"Test me text","text_align":"center","type":"free_text"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"type":"iframe","url":"https://datadoghq.com"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"margin":"large","sizing":"center","type":"image","url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"columns":["Route"],"indexes":["main"],"logset":"106","message_display":"expanded-lg","query":"Route XYZ failed","show_date_column":true,"show_message_column":true,"sort":{"column":"Route","order":"asc"},"time":{"live_span":"2d"},"title":"Test Logstream Widget","title_align":"right","title_size":"16","type":"log_stream"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"color_preference":"background","count":5,"display_format":"counts","hide_zero_counts":false,"query":"Errors are increasing","show_last_triggered":true,"sort":"name,asc","start":0,"summary_type":"combined","title":"Test Monitor Summary Widget","title_align":"center","title_size":"16","type":"manage_status"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"display_format":"two_column","env":"prod","service":"web","show_breakdown":true,"show_distribution":true,"show_errors":true,"show_hits":true,"show_latency":true,"show_resource_list":true,"size_format":"large","span_name":"endpoint","time":{"live_span":"1h"},"title":"Test Service Summary Widget","title_align":"center","title_size":"16","type":"trace_service"},"layout":{"height":10,"width":10,"x":0,"y":0}}]} + {"description":"Test Free layout dashboard for Go client","is_read_only":false,"layout_type":"free","template_variables":[{"default":"*","name":"test template var","prefix":"test-go"}],"title":"go-TestDashboardLifecycle-local-1605615818-free","widgets":[{"definition":{"event_size":"l","query":"Build successful","time":{"live_span":"1d"},"title":"Test Event Stream Widget","title_align":"center","title_size":"16","type":"event_stream"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"query":"Build Failed","time":{"live_span":"1mo"},"title":"Test Event Timeline Widget","title_align":"left","title_size":"16","type":"event_timeline"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"color":"blue","font_size":"16","text":"Test me text","text_align":"center","type":"free_text"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"type":"iframe","url":"https://datadoghq.com"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"margin":"large","sizing":"center","type":"image","url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"columns":["Route"],"indexes":["main"],"logset":"106","message_display":"expanded-lg","query":"Route XYZ failed","show_date_column":true,"show_message_column":true,"sort":{"column":"Route","order":"asc"},"time":{"live_span":"2d"},"title":"Test Logstream Widget","title_align":"right","title_size":"16","type":"log_stream"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"color_preference":"background","count":5,"display_format":"counts","hide_zero_counts":false,"query":"Errors are increasing","show_last_triggered":true,"sort":"name,asc","start":0,"summary_type":"combined","title":"Test Monitor Summary Widget","title_align":"center","title_size":"16","type":"manage_status"},"layout":{"height":10,"width":10,"x":0,"y":0}},{"definition":{"display_format":"two_column","env":"prod","service":"web","show_breakdown":true,"show_distribution":true,"show_errors":true,"show_hits":true,"show_latency":true,"show_resource_list":true,"size_format":"large","span_name":"endpoint","time":{"live_span":"1h"},"title":"Test Service Summary Widget","title_align":"center","title_size":"16","type":"trace_service"},"layout":{"height":10,"width":10,"x":0,"y":0}}]} form: {} headers: Accept: @@ -277,28 +275,28 @@ interactions: Dd-Operation-Id: - CreateDashboard User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "1776843876713061255" + - "6643343172127428212" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" + - "3643868371144386" url: https://api.datadoghq.com/api/v1/dashboard method: POST response: body: '{"notify_list":null,"description":"Test Free layout dashboard for Go client","author_name":null,"template_variables":[{"default":"*","prefix":"test-go","name":"test - template var"}],"is_read_only":false,"id":"k3z-a3e-8gv","title":"go-TestDashboardLifecycle-local-1602718853-free","url":"/dashboard/k3z-a3e-8gv/go-testdashboardlifecycle-local-1602718853-free","created_at":"2020-10-14T23:40:54.640208+00:00","modified_at":"2020-10-14T23:40:54.640208+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"Test + template var"}],"is_read_only":false,"id":"fhq-vg4-4rf","title":"go-TestDashboardLifecycle-local-1605615818-free","url":"/dashboard/fhq-vg4-4rf/go-testdashboardlifecycle-local-1605615818-free","created_at":"2020-11-17T12:23:39.962655+00:00","modified_at":"2020-11-17T12:23:39.962655+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"Test Event Stream Widget","title_align":"center","time":{"live_span":"1d"},"query":"Build - successful","type":"event_stream","event_size":"l"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":4125032060006120},{"definition":{"title_size":"16","title":"Test + successful","type":"event_stream","event_size":"l"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":3603274122267651},{"definition":{"title_size":"16","title":"Test Event Timeline Widget","title_align":"left","time":{"live_span":"1mo"},"query":"Build - Failed","type":"event_timeline"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":6059542798873294},{"definition":{"color":"blue","text":"Test - me text","font_size":"16","text_align":"center","type":"free_text"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":2332900031074518},{"definition":{"url":"https://datadoghq.com","type":"iframe"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":925584722495364},{"definition":{"sizing":"center","type":"image","margin":"large","url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":5037496907092579},{"definition":{"logset":"106","sort":{"column":"Route","order":"asc"},"show_message_column":true,"title_size":"16","title":"Test + Failed","type":"event_timeline"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":4687501210824883},{"definition":{"color":"blue","text":"Test + me text","font_size":"16","text_align":"center","type":"free_text"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":1226944172372636},{"definition":{"url":"https://datadoghq.com","type":"iframe"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":3250424159067410},{"definition":{"sizing":"center","type":"image","margin":"large","url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":1565025995568034},{"definition":{"logset":"106","sort":{"column":"Route","order":"asc"},"show_message_column":true,"title_size":"16","title":"Test Logstream Widget","title_align":"right","message_display":"expanded-lg","indexes":["main"],"columns":["Route"],"time":{"live_span":"2d"},"query":"Route - XYZ failed","type":"log_stream","show_date_column":true},"layout":{"y":0,"width":10,"x":0,"height":10},"id":1345520372925497},{"definition":{"count":5,"sort":"name,asc","title_size":"16","title":"Test + XYZ failed","type":"log_stream","show_date_column":true},"layout":{"y":0,"width":10,"x":0,"height":10},"id":1201128990425845},{"definition":{"count":5,"sort":"name,asc","title_size":"16","title":"Test Monitor Summary Widget","title_align":"center","hide_zero_counts":false,"start":0,"summary_type":"combined","color_preference":"background","query":"Errors - are increasing","show_last_triggered":true,"type":"manage_status","display_format":"counts"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":7215699923074381},{"definition":{"span_name":"endpoint","title_size":"16","service":"web","title":"Test - Service Summary Widget","size_format":"large","show_hits":true,"title_align":"center","show_errors":true,"show_breakdown":true,"type":"trace_service","env":"prod","time":{"live_span":"1h"},"show_distribution":true,"display_format":"two_column","show_latency":true,"show_resource_list":true},"layout":{"y":0,"width":10,"x":0,"height":10},"id":3521989995617065}],"layout_type":"free"}' + are increasing","show_last_triggered":true,"type":"manage_status","display_format":"counts"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":7374706778453996},{"definition":{"span_name":"endpoint","title_size":"16","service":"web","title":"Test + Service Summary Widget","size_format":"large","show_hits":true,"title_align":"center","show_errors":true,"show_breakdown":true,"type":"trace_service","env":"prod","time":{"live_span":"1h"},"show_distribution":true,"display_format":"two_column","show_latency":true,"show_resource_list":true},"layout":{"y":0,"width":10,"x":0,"height":10},"id":8943080217568124}],"layout_type":"free"}' headers: Cache-Control: - no-cache @@ -307,13 +305,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:40:54 GMT + - Tue, 17 Nov 2020 12:23:40 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:40:54 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:39 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -322,9 +320,9 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - YUzGVvPO6U9s4YDcAehC8chdShvAB/4ui8eck/ZCafPignncGB/BO6U/rVr9hrIe + - 5H2EXEXOPQC4s7BfWBFjlM6rKywFNh1Cf33eK1xYuPFdBfR+3y2m7Dyr75gZ4kw1 X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN status: 200 OK @@ -339,28 +337,28 @@ interactions: Dd-Operation-Id: - GetDashboard User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "5273314479403190497" + - "8439980677032373562" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" - url: https://api.datadoghq.com/api/v1/dashboard/k3z-a3e-8gv + - "3643868371144386" + url: https://api.datadoghq.com/api/v1/dashboard/fhq-vg4-4rf method: GET response: body: '{"notify_list":null,"description":"Test Free layout dashboard for Go client","author_name":null,"template_variables":[{"default":"*","prefix":"test-go","name":"test - template var"}],"is_read_only":false,"id":"k3z-a3e-8gv","title":"go-TestDashboardLifecycle-local-1602718853-free","url":"/dashboard/k3z-a3e-8gv/go-testdashboardlifecycle-local-1602718853-free","created_at":"2020-10-14T23:40:54.640208+00:00","modified_at":"2020-10-14T23:40:54.640208+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"Test + template var"}],"is_read_only":false,"id":"fhq-vg4-4rf","title":"go-TestDashboardLifecycle-local-1605615818-free","url":"/dashboard/fhq-vg4-4rf/go-testdashboardlifecycle-local-1605615818-free","created_at":"2020-11-17T12:23:39.962655+00:00","modified_at":"2020-11-17T12:23:39.962655+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"Test Event Stream Widget","title_align":"center","time":{"live_span":"1d"},"query":"Build - successful","type":"event_stream","event_size":"l"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":4125032060006120},{"definition":{"title_size":"16","title":"Test + successful","type":"event_stream","event_size":"l"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":3603274122267651},{"definition":{"title_size":"16","title":"Test Event Timeline Widget","title_align":"left","time":{"live_span":"1mo"},"query":"Build - Failed","type":"event_timeline"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":6059542798873294},{"definition":{"color":"blue","text":"Test - me text","font_size":"16","text_align":"center","type":"free_text"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":2332900031074518},{"definition":{"url":"https://datadoghq.com","type":"iframe"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":925584722495364},{"definition":{"sizing":"center","type":"image","margin":"large","url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":5037496907092579},{"definition":{"logset":"106","sort":{"column":"Route","order":"asc"},"show_message_column":true,"title_size":"16","title":"Test + Failed","type":"event_timeline"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":4687501210824883},{"definition":{"color":"blue","text":"Test + me text","font_size":"16","text_align":"center","type":"free_text"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":1226944172372636},{"definition":{"url":"https://datadoghq.com","type":"iframe"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":3250424159067410},{"definition":{"sizing":"center","type":"image","margin":"large","url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":1565025995568034},{"definition":{"logset":"106","sort":{"column":"Route","order":"asc"},"show_message_column":true,"title_size":"16","title":"Test Logstream Widget","title_align":"right","message_display":"expanded-lg","indexes":["main"],"columns":["Route"],"time":{"live_span":"2d"},"query":"Route - XYZ failed","type":"log_stream","show_date_column":true},"layout":{"y":0,"width":10,"x":0,"height":10},"id":1345520372925497},{"definition":{"count":5,"sort":"name,asc","title_size":"16","title":"Test + XYZ failed","type":"log_stream","show_date_column":true},"layout":{"y":0,"width":10,"x":0,"height":10},"id":1201128990425845},{"definition":{"count":5,"sort":"name,asc","title_size":"16","title":"Test Monitor Summary Widget","title_align":"center","hide_zero_counts":false,"start":0,"summary_type":"combined","color_preference":"background","query":"Errors - are increasing","show_last_triggered":true,"type":"manage_status","display_format":"counts"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":7215699923074381},{"definition":{"span_name":"endpoint","title_size":"16","service":"web","title":"Test - Service Summary Widget","size_format":"large","show_hits":true,"title_align":"center","show_errors":true,"show_breakdown":true,"type":"trace_service","env":"prod","time":{"live_span":"1h"},"show_distribution":true,"display_format":"two_column","show_latency":true,"show_resource_list":true},"layout":{"y":0,"width":10,"x":0,"height":10},"id":3521989995617065}],"layout_type":"free"}' + are increasing","show_last_triggered":true,"type":"manage_status","display_format":"counts"},"layout":{"y":0,"width":10,"x":0,"height":10},"id":7374706778453996},{"definition":{"span_name":"endpoint","title_size":"16","service":"web","title":"Test + Service Summary Widget","size_format":"large","show_hits":true,"title_align":"center","show_errors":true,"show_breakdown":true,"type":"trace_service","env":"prod","time":{"live_span":"1h"},"show_distribution":true,"display_format":"two_column","show_latency":true,"show_resource_list":true},"layout":{"y":0,"width":10,"x":0,"height":10},"id":8943080217568124}],"layout_type":"free"}' headers: Cache-Control: - no-cache @@ -369,13 +367,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:40:54 GMT + - Tue, 17 Nov 2020 12:23:40 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:40:54 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:40 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -384,9 +382,9 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - vJlCdCjZjHKDWCQaZXaKHjefwu7Jotxr42UmWttwNlCEvibEd08wFg9UscwYl4z7 + - b7N5fdPhYXDjMBDnrRAJWxJNxeU8H5y+B5ea/L1cXAMez449FKZtw3SF5mhatH7J X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN status: 200 OK @@ -394,7 +392,7 @@ interactions: duration: "" - request: body: | - {"description":null,"is_read_only":false,"layout_type":"ordered","title":"go-TestDashboardLifecycle-local-1602718853-ordered","widgets":[{"definition":{"alert_id":"1234","time":{"live_span":"15m"},"title":"Test Alert Graph Widget","title_align":"center","title_size":"16","type":"alert_graph","viz_type":"timeseries"}},{"definition":{"alert_id":"1234","precision":2,"text_align":"center","title":"Test Alert Value Widget","title_align":"right","title_size":"12","type":"alert_value","unit":"ms"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"change_type":"absolute","compare_to":"hour_before","increase_good":true,"order_by":"change","order_dir":"asc","q":"avg:system.load.1{*}","show_present":true}],"time":{"live_span":"15m"},"title":"Test Change Widget","title_align":"center","title_size":"16","type":"change"}},{"definition":{"check":"service_check.up","group":"*","group_by":["bar"],"grouping":"check","tags":["foo:bar"],"time":{"live_span":"15m"},"title":"Test Check Status Widget","title_align":"center","title_size":"16","type":"check_status"}},{"definition":{"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test Distribution Widget","title_align":"center","title_size":"16","type":"distribution"}},{"definition":{"layout_type":"ordered","title":"Test Group Widget","type":"group","widgets":[{"definition":{"content":"Test Note Inside Group","type":"note"}}]}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded","tags_execution":"tags"}],"legend_size":"4","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test Headmap Widget","title_align":"center","title_size":"16","type":"heatmap","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"group":["env:prod"],"no_group_hosts":true,"no_metric_hosts":true,"node_type":"container","requests":{"fill":{"q":"avg:system.load.1{*}"},"size":{"q":"avg:system.load.1{*}"}},"scope":["foo"],"style":{"fill_max":"100","fill_min":"0","palette":"dog_classic","palette_flip":true},"title":"Test HostMap Widget","title_align":"center","title_size":"16","type":"hostmap"}},{"definition":{"background_color":"blue","content":"Updated content","font_size":"30","show_tick":true,"text_align":"center","tick_edge":"bottom","tick_pos":"4","type":"note"}},{"definition":{"autoscale":true,"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"custom_unit":"ns","precision":2,"requests":[{"aggregator":"avg","conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"q":"avg:system.load.1{*}"}],"text_align":"center","time":{"live_span":"15m"},"title":"Test Query Value Widget","title_align":"center","title_size":"16","type":"query_value"}},{"definition":{"color_by_groups":["env"],"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":{"x":{"aggregator":"avg","q":"avg:system.load.1{*}"},"y":{"aggregator":"avg","q":"avg:system.load.1{*}"}},"time":{"live_span":"15m"},"title":"Test ScatterPlot Widget","title_align":"center","title_size":"16","type":"scatterplot","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"show_error_budget":true,"slo_id":"278a378e82285dd98d34688ea57bb988","time_windows":["7d"],"title":"Test SLO Widget","title_align":"center","title_size":"16","type":"slo","view_mode":"both","view_type":"detail"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"filters":["*"],"service":"1234","title":"Test Service Map Widget","title_align":"center","title_size":"16","type":"servicemap"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"has_search_bar":"auto","requests":[{"aggregator":"avg","alias":"System Load","cell_display_mode":["number"],"conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"limit":50,"order":"asc","q":"avg:system.load.1{*}"}],"time":{"live_span":"15m"},"title":"Test Table Widget","title_align":"center","title_size":"16","type":"query_table"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"apm_stats_query":{"columns":[{"name":"baz"}],"env":"prod","name":"web","primary_tag":"foo:*","resource":"endpoint","row_type":"span","service":""}}],"time":{"live_span":"15m"},"title":"Test Table Widget with APM Stats Data","title_align":"center","title_size":"16","type":"query_table"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"q":"avg:system.load.1{*}","style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"label":"Widget Scale","max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"label":"Widget Scale","max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"process_query":{"filter_by":["account:test"],"limit":10,"metric":"process.stat.cpu.total_pct","search_by":"editor"},"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Process Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","log_query":{"compute":{"aggregation":"count","facet":"host","interval":10},"group_by":[{"facet":"host","limit":5,"sort":{"aggregation":"count","order":"asc"}}],"index":"main","search":{"query":"Error parsing"}},"metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Log Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","event_query":{"search":"Build failure","tags_execution":"build"},"metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Event Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"q":"avg:system.load.1{*}"}],"time":{"live_span":"15m"},"title":"Test Toplist Widget","title_align":"center","title_size":"16","type":"toplist"}}]} + {"description":null,"is_read_only":false,"layout_type":"ordered","title":"go-TestDashboardLifecycle-local-1605615818-ordered","widgets":[{"definition":{"alert_id":"1234","time":{"live_span":"15m"},"title":"Test Alert Graph Widget","title_align":"center","title_size":"16","type":"alert_graph","viz_type":"timeseries"}},{"definition":{"alert_id":"1234","precision":2,"text_align":"center","title":"Test Alert Value Widget","title_align":"right","title_size":"12","type":"alert_value","unit":"ms"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"change_type":"absolute","compare_to":"hour_before","increase_good":true,"order_by":"change","order_dir":"asc","q":"avg:system.load.1{*}","show_present":true}],"time":{"live_span":"15m"},"title":"Test Change Widget","title_align":"center","title_size":"16","type":"change"}},{"definition":{"check":"service_check.up","group":"*","group_by":["bar"],"grouping":"check","tags":["foo:bar"],"time":{"live_span":"15m"},"title":"Test Check Status Widget","title_align":"center","title_size":"16","type":"check_status"}},{"definition":{"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test Distribution Widget","title_align":"center","title_size":"16","type":"distribution"}},{"definition":{"layout_type":"ordered","title":"Test Group Widget","type":"group","widgets":[{"definition":{"content":"Test Note Inside Group","type":"note"}}]}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded","tags_execution":"tags"}],"legend_size":"4","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test Headmap Widget","title_align":"center","title_size":"16","type":"heatmap","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"group":["env:prod"],"no_group_hosts":true,"no_metric_hosts":true,"node_type":"container","requests":{"fill":{"q":"avg:system.load.1{*}"},"size":{"q":"avg:system.load.1{*}"}},"scope":["foo"],"style":{"fill_max":"100","fill_min":"0","palette":"dog_classic","palette_flip":true},"title":"Test HostMap Widget","title_align":"center","title_size":"16","type":"hostmap"}},{"definition":{"background_color":"blue","content":"Updated content","font_size":"30","show_tick":true,"text_align":"center","tick_edge":"bottom","tick_pos":"4","type":"note"}},{"definition":{"autoscale":true,"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"custom_unit":"ns","precision":2,"requests":[{"aggregator":"avg","conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"q":"avg:system.load.1{*}"}],"text_align":"center","time":{"live_span":"15m"},"title":"Test Query Value Widget","title_align":"center","title_size":"16","type":"query_value"}},{"definition":{"color_by_groups":["env"],"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":{"x":{"aggregator":"avg","q":"avg:system.load.1{*}"},"y":{"aggregator":"avg","q":"avg:system.load.1{*}"}},"time":{"live_span":"15m"},"title":"Test ScatterPlot Widget","title_align":"center","title_size":"16","type":"scatterplot","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"show_error_budget":true,"slo_id":"7fc5606f63325ba58f49e564bc7e53cc","time_windows":["7d"],"title":"Test SLO Widget","title_align":"center","title_size":"16","type":"slo","view_mode":"both","view_type":"detail"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"filters":["*"],"service":"1234","title":"Test Service Map Widget","title_align":"center","title_size":"16","type":"servicemap"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"has_search_bar":"auto","requests":[{"aggregator":"avg","alias":"System Load","cell_display_mode":["number"],"conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"limit":50,"order":"asc","q":"avg:system.load.1{*}"}],"time":{"live_span":"15m"},"title":"Test Table Widget","title_align":"center","title_size":"16","type":"query_table"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"apm_stats_query":{"columns":[{"name":"baz"}],"env":"prod","name":"web","primary_tag":"foo:*","resource":"endpoint","row_type":"span","service":""}}],"time":{"live_span":"15m"},"title":"Test Table Widget with APM Stats Data","title_align":"center","title_size":"16","type":"query_table"}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"q":"avg:system.load.1{*}","style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"label":"Widget Scale","max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"label":"Widget Scale","max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"process_query":{"filter_by":["account:test"],"limit":10,"metric":"process.stat.cpu.total_pct","search_by":"editor"},"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Process Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","log_query":{"compute":{"aggregation":"count","facet":"host","interval":10},"group_by":[{"facet":"host","limit":5,"sort":{"aggregation":"count","order":"asc"}}],"index":"main","search":{"query":"Error parsing"}},"metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Log Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"events":[{"q":"Build succeeded"}],"legend_size":"16","markers":[{"display_type":"error dashed","label":"error threshold","time":"4h","value":"y=15"}],"requests":[{"display_type":"line","event_query":{"compute":{"aggregation":"count","facet":"host","interval":10},"group_by":[{"facet":"host","limit":5,"sort":{"aggregation":"count","order":"asc"}}],"index":"*","search":{"query":"source:kubernetes"}},"metadata":[{"alias_name":"Aliased metric","expression":"avg:system.load.1{*}"}],"on_right_yaxis":true,"style":{"line_type":"dashed","line_width":"thick","palette":"dog_classic"}}],"right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"},"show_legend":true,"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Event Query","title_align":"center","title_size":"16","type":"timeseries","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear"}}},{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"requests":[{"conditional_formats":[{"comparator":"\u003e","custom_bg_color":"blue","custom_fg_color":"black","image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","palette":"red_on_white","value":7}],"q":"avg:system.load.1{*}"}],"time":{"live_span":"15m"},"title":"Test Toplist Widget","title_align":"center","title_size":"16","type":"toplist"}}]} form: {} headers: Accept: @@ -404,63 +402,62 @@ interactions: Dd-Operation-Id: - UpdateDashboard User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "2229124104530332958" + - "724349297595873365" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" - url: https://api.datadoghq.com/api/v1/dashboard/hrr-t66-h8p + - "3643868371144386" + url: https://api.datadoghq.com/api/v1/dashboard/s9u-t2c-va7 method: PUT response: - body: '{"notify_list":null,"description":null,"author_name":null,"template_variables":null,"is_read_only":false,"id":"hrr-t66-h8p","title":"go-TestDashboardLifecycle-local-1602718853-ordered","url":"/dashboard/hrr-t66-h8p/go-testdashboardlifecycle-local-1602718853-ordered","created_at":"2020-10-14T23:40:54.356111+00:00","modified_at":"2020-10-14T23:40:55.206560+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","viz_type":"timeseries","title":"Test - Alert Graph Widget","title_align":"center","alert_id":"1234","time":{"live_span":"15m"},"type":"alert_graph"},"id":5817885087667189},{"definition":{"title_size":"12","title":"Test - Alert Value Widget","title_align":"right","text_align":"center","precision":2,"alert_id":"1234","type":"alert_value","unit":"ms"},"id":6295674468971377},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test Change Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"change_type":"absolute","order_dir":"asc","compare_to":"hour_before","q":"avg:system.load.1{*}","show_present":true,"increase_good":true,"order_by":"change"}],"type":"change"},"id":378068030895415},{"definition":{"group":"*","title":"Test - Check Status Widget","title_align":"center","group_by":["bar"],"time":{"live_span":"15m"},"title_size":"16","type":"check_status","check":"service_check.up","tags":["foo:bar"],"grouping":"check"},"id":5826752807056636},{"definition":{"title_size":"16","title":"Test - Distribution Widget","title_align":"center","show_legend":true,"time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"type":"distribution"},"id":573533553257876},{"definition":{"widgets":[{"definition":{"content":"Test - Note Inside Group","type":"note"},"id":7241398076801819}],"layout_type":"ordered","type":"group","title":"Test - Group Widget"},"id":6950864858869815},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + body: '{"notify_list":null,"description":null,"author_name":null,"template_variables":null,"is_read_only":false,"id":"s9u-t2c-va7","title":"go-TestDashboardLifecycle-local-1605615818-ordered","url":"/dashboard/s9u-t2c-va7/go-testdashboardlifecycle-local-1605615818-ordered","created_at":"2020-11-17T12:23:39.524374+00:00","modified_at":"2020-11-17T12:23:40.543562+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","viz_type":"timeseries","title":"Test + Alert Graph Widget","title_align":"center","alert_id":"1234","time":{"live_span":"15m"},"type":"alert_graph"},"id":937855337593779},{"definition":{"title_size":"12","title":"Test + Alert Value Widget","title_align":"right","text_align":"center","precision":2,"alert_id":"1234","type":"alert_value","unit":"ms"},"id":3890537546364378},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test Change Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"change_type":"absolute","order_dir":"asc","compare_to":"hour_before","q":"avg:system.load.1{*}","show_present":true,"increase_good":true,"order_by":"change"}],"type":"change"},"id":4305234524725988},{"definition":{"group":"*","title":"Test + Check Status Widget","title_align":"center","group_by":["bar"],"time":{"live_span":"15m"},"title_size":"16","type":"check_status","check":"service_check.up","tags":["foo:bar"],"grouping":"check"},"id":842072485735588},{"definition":{"title_size":"16","title":"Test + Distribution Widget","title_align":"center","show_legend":true,"time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}],"type":"distribution"},"id":8254661956072483},{"definition":{"widgets":[{"definition":{"content":"Test + Note Inside Group","type":"note"},"id":7769547661522888}],"layout_type":"ordered","type":"group","title":"Test + Group Widget"},"id":5505427444071053},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","events":[{"q":"Build succeeded","tags_execution":"tags"}],"show_legend":true,"time":{"live_span":"15m"},"title":"Test - Headmap Widget","legend_size":"4","type":"heatmap","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}]},"id":6788526673325501},{"definition":{"style":{"fill_min":"0","fill_max":"100","palette":"dog_classic","palette_flip":true},"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test HostMap Widget","title_align":"center","node_type":"container","no_metric_hosts":true,"group":["env:prod"],"requests":{"size":{"q":"avg:system.load.1{*}"},"fill":{"q":"avg:system.load.1{*}"}},"no_group_hosts":true,"type":"hostmap","scope":["foo"]},"id":1795982790255189},{"definition":{"tick_pos":"4","font_size":"30","type":"note","tick_edge":"bottom","text_align":"center","content":"Updated - content","show_tick":true,"background_color":"blue"},"id":1463638056410780},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"autoscale":true,"title":"Test Query Value Widget","title_align":"center","custom_unit":"ns","text_align":"center","precision":2,"time":{"live_span":"15m"},"title_size":"16","requests":[{"q":"avg:system.load.1{*}","aggregator":"avg","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"query_value"},"id":5287183886325834},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Headmap Widget","legend_size":"4","type":"heatmap","requests":[{"q":"avg:system.load.1{*}","style":{"palette":"dog_classic"}}]},"id":3635871123967726},{"definition":{"style":{"fill_min":"0","fill_max":"100","palette":"dog_classic","palette_flip":true},"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test HostMap Widget","title_align":"center","node_type":"container","no_metric_hosts":true,"group":["env:prod"],"requests":{"size":{"q":"avg:system.load.1{*}"},"fill":{"q":"avg:system.load.1{*}"}},"no_group_hosts":true,"type":"hostmap","scope":["foo"]},"id":2101718796601510},{"definition":{"tick_pos":"4","font_size":"30","type":"note","tick_edge":"bottom","text_align":"center","content":"Updated + content","show_tick":true,"background_color":"blue"},"id":6919271743905020},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"autoscale":true,"title":"Test Query Value Widget","title_align":"center","custom_unit":"ns","text_align":"center","precision":2,"time":{"live_span":"15m"},"title_size":"16","requests":[{"q":"avg:system.load.1{*}","aggregator":"avg","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"query_value"},"id":1411031796919638},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","color_by_groups":["env"],"time":{"live_span":"15m"},"title":"Test - ScatterPlot Widget","requests":{"y":{"q":"avg:system.load.1{*}","aggregator":"avg"},"x":{"q":"avg:system.load.1{*}","aggregator":"avg"}},"type":"scatterplot"},"id":170585338777262},{"definition":{"time_windows":["7d"],"title_size":"16","show_error_budget":true,"title":"Test - SLO Widget","title_align":"center","slo_id":"278a378e82285dd98d34688ea57bb988","view_mode":"both","view_type":"detail","type":"slo"},"id":4498555973634954},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + ScatterPlot Widget","requests":{"y":{"q":"avg:system.load.1{*}","aggregator":"avg"},"x":{"q":"avg:system.load.1{*}","aggregator":"avg"}},"type":"scatterplot"},"id":1364054769848116},{"definition":{"time_windows":["7d"],"title_size":"16","show_error_budget":true,"title":"Test + SLO Widget","title_align":"center","slo_id":"7fc5606f63325ba58f49e564bc7e53cc","view_mode":"both","view_type":"detail","type":"slo"},"id":8333692741897530},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","service":"1234","title":"Test Service - Map Widget","title_align":"center","filters":["*"],"type":"servicemap"},"id":5144970624163666},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Map Widget","title_align":"center","filters":["*"],"type":"servicemap"},"id":4167255708905440},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","title":"Test Table Widget","title_align":"center","has_search_bar":"auto","time":{"live_span":"15m"},"requests":[{"aggregator":"avg","cell_display_mode":["number"],"conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}],"q":"avg:system.load.1{*}","alias":"System - Load","limit":50,"order":"asc"}],"type":"query_table"},"id":1242202050733615},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Load","limit":50,"order":"asc"}],"type":"query_table"},"id":5669323302992851},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","title":"Test Table Widget with APM Stats - Data","title_align":"center","time":{"live_span":"15m"},"requests":[{"apm_stats_query":{"primary_tag":"foo:*","resource":"endpoint","name":"web","service":"","row_type":"span","env":"prod","columns":[{"name":"baz"}]}}],"type":"query_table"},"id":8879184851938239},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Data","title_align":"center","time":{"live_span":"15m"},"requests":[{"apm_stats_query":{"primary_tag":"foo:*","resource":"endpoint","name":"web","service":"","row_type":"span","env":"prod","columns":[{"name":"baz"}]}}],"type":"query_table"},"id":5113466330038448},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear","label":"Widget Scale"},"title_align":"center","right_yaxis":{"include_zero":true,"max":"100","min":"0","scale":"linear","label":"Widget Scale"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget","legend_size":"16","type":"timeseries","requests":[{"q":"avg:system.load.1{*}","on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"display_type":"line","metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":2472400761383550},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":3735380795067421},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Process Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"process_query":{"search_by":"editor","metric":"process.stat.cpu.total_pct","limit":10,"filter_by":["account:test"]},"display_type":"line","metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":3483554087815606},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":3708206998307677},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test Timeseries Widget with Log Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"display_type":"line","log_query":{"index":"main","search":{"query":"Error parsing"},"group_by":[{"facet":"host","sort":{"aggregation":"count","order":"asc"},"limit":5}],"compute":{"facet":"host","interval":10,"aggregation":"count"}},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":3769292693191478},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + metric"}]}]},"id":6824448953471530},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test Custom Link label"}],"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"title_align":"center","right_yaxis":{"include_zero":true,"scale":"linear","min":"0","max":"100"},"events":[{"q":"Build succeeded"}],"show_legend":true,"markers":[{"time":"4h","display_type":"error dashed","value":"y=15","label":"error threshold"}],"time":{"live_span":"15m"},"title":"Test - Timeseries Widget with Event Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"event_query":{"search":"Build - failure","tags_execution":"build"},"display_type":"line","style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased - metric"}]}]},"id":442532264133186},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test - Custom Link label"}],"title_size":"16","title":"Test Toplist Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"toplist"},"id":6341098194152180}],"layout_type":"ordered"}' + Timeseries Widget with Event Query","legend_size":"16","type":"timeseries","requests":[{"on_right_yaxis":true,"event_query":{"index":"*","search":{"query":"source:kubernetes"},"group_by":[{"facet":"host","sort":{"aggregation":"count","order":"asc"},"limit":5}],"compute":{"facet":"host","interval":10,"aggregation":"count"}},"display_type":"line","style":{"line_width":"thick","palette":"dog_classic","line_type":"dashed"},"metadata":[{"expression":"avg:system.load.1{*}","alias_name":"Aliased + metric"}]}]},"id":2977613726625792},{"definition":{"custom_links":[{"link":"https://app.datadoghq.com/dashboard/lists","label":"Test + Custom Link label"}],"title_size":"16","title":"Test Toplist Widget","title_align":"center","time":{"live_span":"15m"},"requests":[{"q":"avg:system.load.1{*}","conditional_formats":[{"palette":"red_on_white","comparator":">","custom_bg_color":"blue","value":7,"image_url":"https://docs.datadoghq.com/images/dashboards/widgets/image/image.mp4","custom_fg_color":"black"}]}],"type":"toplist"},"id":4658803413612420}],"layout_type":"ordered"}' headers: Cache-Control: - no-cache @@ -469,13 +466,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:40:55 GMT + - Tue, 17 Nov 2020 12:23:40 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:40:54 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:40 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -484,9 +481,9 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - uJ83xA1OCfjNbetv+4JhF+oFizEHF56t3Lja6jtB8P5etMWBi14GRkWSrGetOvyr + - nHGjqTbGmPRJGWoHEDsaMxmZCicxo5Y/AObJEW+YW63Ub16t9U+JqCkAyvEnf+xI X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN status: 200 OK @@ -501,17 +498,17 @@ interactions: Dd-Operation-Id: - DeleteDashboard User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "5986431406652930826" + - "860454620355470829" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" - url: https://api.datadoghq.com/api/v1/dashboard/k3z-a3e-8gv + - "3643868371144386" + url: https://api.datadoghq.com/api/v1/dashboard/fhq-vg4-4rf method: DELETE response: - body: '{"deleted_dashboard_id":"k3z-a3e-8gv"}' + body: '{"deleted_dashboard_id":"fhq-vg4-4rf"}' headers: Cache-Control: - no-cache @@ -520,13 +517,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:41:46 GMT + - Tue, 17 Nov 2020 12:23:40 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:40:55 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:40 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -535,9 +532,9 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - hhAfI9DpjHRbHS2z+2prVh0mHwAun3McFDOF8AzNv8c8J6c/l2q8Kye8syKGTxkY + - bOYRvpIMaDWtEAFc77xh4cYKoSxr/zmllvfW+/1TUFo7Zbru0n5QEX4LCoKiS3Mv X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN status: 200 OK @@ -552,17 +549,17 @@ interactions: Dd-Operation-Id: - DeleteDashboard User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "8928814084463665091" + - "8599772009525822795" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" - url: https://api.datadoghq.com/api/v1/dashboard/k3z-a3e-8gv + - "3643868371144386" + url: https://api.datadoghq.com/api/v1/dashboard/fhq-vg4-4rf method: DELETE response: - body: '{"errors": ["Dashboard with ID k3z-a3e-8gv not found"]}' + body: '{"errors": ["Dashboard with ID fhq-vg4-4rf not found"]}' headers: Cache-Control: - no-cache @@ -571,7 +568,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:41:46 GMT + - Tue, 17 Nov 2020 12:23:41 GMT Dd-Pool: - dogweb Pragma: @@ -583,7 +580,7 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN status: 404 Not Found @@ -598,17 +595,17 @@ interactions: Dd-Operation-Id: - DeleteDashboard User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "2868288233581719750" + - "4106748371379557993" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" - url: https://api.datadoghq.com/api/v1/dashboard/hrr-t66-h8p + - "3643868371144386" + url: https://api.datadoghq.com/api/v1/dashboard/s9u-t2c-va7 method: DELETE response: - body: '{"deleted_dashboard_id":"hrr-t66-h8p"}' + body: '{"deleted_dashboard_id":"s9u-t2c-va7"}' headers: Cache-Control: - no-cache @@ -617,13 +614,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:42:32 GMT + - Tue, 17 Nov 2020 12:23:41 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:41:46 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:41 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -632,9 +629,9 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - 35J49GdWRZ44BXWQv5M8k5DMOKDsnUL/+b8VnKl01OT828ngNdfZvXJ9jRXKLHFA + - 2yLQyeuXdHKf2qhVlcnhVSRUgzA6Krta0LEltrGESIMHoX7HWgb/dSrVA+a76Sm3 X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN status: 200 OK @@ -649,17 +646,17 @@ interactions: Dd-Operation-Id: - DeleteSLO User-Agent: - - datadog-api-client-go/1.0.0-beta.9+dev (go go1.13.1; os darwin; arch amd64) + - datadog-api-client-go/1.0.0-beta.11+dev (go go1.15.1; os darwin; arch amd64) X-Datadog-Parent-Id: - - "6895214461276540905" + - "610537500007817975" X-Datadog-Sampling-Priority: - "1" X-Datadog-Trace-Id: - - "2397264796055226458" - url: https://api.datadoghq.com/api/v1/slo/278a378e82285dd98d34688ea57bb988 + - "3643868371144386" + url: https://api.datadoghq.com/api/v1/slo/7fc5606f63325ba58f49e564bc7e53cc method: DELETE response: - body: '{"data":["278a378e82285dd98d34688ea57bb988"],"error":null}' + body: '{"data":["7fc5606f63325ba58f49e564bc7e53cc"],"error":null}' headers: Cache-Control: - no-cache @@ -668,13 +665,13 @@ interactions: Content-Type: - application/json Date: - - Wed, 14 Oct 2020 23:42:33 GMT + - Tue, 17 Nov 2020 12:23:41 GMT Dd-Pool: - dogweb Pragma: - no-cache Set-Cookie: - - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Wed, 21-Oct-2020 23:42:32 GMT; + - DD-PSHARD=233; Max-Age=604800; Path=/; expires=Tue, 24-Nov-2020 12:23:41 GMT; secure; HttpOnly Strict-Transport-Security: - max-age=15724800; @@ -683,11 +680,19 @@ interactions: X-Content-Type-Options: - nosniff X-Dd-Debug: - - NVN1vUIP943yBv5BrKvNkq9LhGENimQCGx913v3GQzIJuXIMEzcrTlr1CpALPFWv + - g1JN5WIJ1Um2nWq9AQ7orHFBA37V3eIZYgeyDV/dLV8QtbkkvRVVIW0Fy1xXObzE X-Dd-Version: - - "35.3195762" + - "35.3380970" X-Frame-Options: - SAMEORIGIN + X-Ratelimit-Limit: + - "12000" + X-Ratelimit-Period: + - "60" + X-Ratelimit-Remaining: + - "11999" + X-Ratelimit-Reset: + - "19" status: 200 OK code: 200 duration: ""