diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 1756c3d2d6c0..4707c147e8b2 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -1828,6 +1828,38 @@ components: x-enum-varnames: - CUSTOM_TIMEBOARD - CUSTOM_SCREENBOARD + DataProjectionQuery: + description: Query configuration for a data projection request. + properties: + data_source: + description: Data source for the query. + example: logs + type: string + indexes: + description: List of indexes to query. + items: + description: Index name. + type: string + type: array + query_string: + description: The query string to filter events. + example: "service:web-store" + type: string + storage: + description: Storage location for the query. + type: string + required: + - query_string + - data_source + type: object + DataProjectionRequestType: + description: Type of a data projection request. + enum: + - data_projection + example: data_projection + type: string + x-enum-varnames: + - DATA_PROJECTION DeleteSharedDashboardResponse: description: Response containing token of deleted shared dashboard. properties: @@ -11343,6 +11375,150 @@ components: maxItems: 2 minItems: 2 type: array + PointPlotDimension: + description: Dimension of the point plot. + enum: + - group + - time + - y + - radius + example: y + type: string + x-enum-varnames: + - GROUP + - TIME + - Y + - RADIUS + PointPlotProjection: + description: Projection configuration for the point plot widget. + properties: + dimensions: + description: List of dimension mappings for the projection. + items: + $ref: "#/components/schemas/PointPlotProjectionDimension" + type: array + extra_columns: + description: Additional columns to include in the projection. + items: + description: Column name. + type: string + type: array + type: + $ref: "#/components/schemas/PointPlotProjectionType" + required: + - type + - dimensions + type: object + PointPlotProjectionDimension: + description: Dimension mapping for the point plot projection. + properties: + alias: + description: Alias for the column. + type: string + column: + description: Source column name from the dataset. + example: duration + type: string + dimension: + $ref: "#/components/schemas/PointPlotDimension" + required: + - column + - dimension + type: object + PointPlotProjectionType: + description: Type of the projection. + enum: + - point_plot + example: point_plot + type: string + x-enum-varnames: + - POINT_PLOT + PointPlotWidgetDefinition: + description: The point plot displays individual data points over time. + properties: + custom_links: + description: List of custom links. + items: + $ref: "#/components/schemas/WidgetCustomLink" + type: array + description: + description: The description of the widget. + type: string + legend: + $ref: "#/components/schemas/PointPlotWidgetLegend" + markers: + description: List of markers for the widget. + items: + $ref: "#/components/schemas/WidgetMarker" + type: array + requests: + description: List of request configurations for the widget. + items: + $ref: "#/components/schemas/PointPlotWidgetRequest" + type: array + time: + $ref: "#/components/schemas/WidgetTime" + title: + description: Title of the widget. + type: string + title_align: + $ref: "#/components/schemas/WidgetTextAlign" + title_size: + description: Size of the title. + type: string + type: + $ref: "#/components/schemas/PointPlotWidgetDefinitionType" + yaxis: + $ref: "#/components/schemas/WidgetAxis" + required: + - type + - requests + type: object + PointPlotWidgetDefinitionType: + default: point_plot + description: Type of the point plot widget. + enum: + - point_plot + example: point_plot + type: string + x-enum-varnames: + - POINT_PLOT + PointPlotWidgetLegend: + description: Legend configuration for the point plot widget. + properties: + type: + $ref: "#/components/schemas/PointPlotWidgetLegendType" + required: + - type + type: object + PointPlotWidgetLegendType: + description: Type of legend to show for the point plot widget. + enum: + - automatic + - none + example: automatic + type: string + x-enum-varnames: + - AUTOMATIC + - NONE + PointPlotWidgetRequest: + description: Request configuration for the point plot widget. + properties: + limit: + description: Maximum number of data points to return. + format: int64 + type: integer + projection: + $ref: "#/components/schemas/PointPlotProjection" + query: + $ref: "#/components/schemas/DataProjectionQuery" + request_type: + $ref: "#/components/schemas/DataProjectionRequestType" + required: + - request_type + - query + - projection + type: object PowerpackTemplateVariableContents: description: Powerpack template variable contents. properties: @@ -25663,6 +25839,7 @@ components: - $ref: "#/components/schemas/MonitorSummaryWidgetDefinition" - $ref: "#/components/schemas/NoteWidgetDefinition" - $ref: "#/components/schemas/PowerpackWidgetDefinition" + - $ref: "#/components/schemas/PointPlotWidgetDefinition" - $ref: "#/components/schemas/QueryValueWidgetDefinition" - $ref: "#/components/schemas/RetentionCurveWidgetDefinition" - $ref: "#/components/schemas/RunWorkflowWidgetDefinition" diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 18755c0511d9..6c5ab8350716 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -698,28 +698,6 @@ components: schema: example: "ExampleServiceName" type: string - IncidentTeamIDPathParameter: - description: The ID of the incident team. - in: path - name: team_id - required: true - schema: - type: string - IncidentTeamIncludeQueryParameter: - description: Specifies which types of related objects should be included in the response. - in: query - name: "include" - required: false - schema: - $ref: "#/components/schemas/IncidentRelatedObject" - IncidentTeamSearchQueryParameter: - description: A search query that filters teams by name. - in: query - name: "filter" - required: false - schema: - example: "ExampleTeamName" - type: string IncidentTodoIDPathParameter: description: The UUID of the incident todo. in: path @@ -4231,6 +4209,8 @@ components: description: >- A query for APM dependency statistics between services, such as call latency and error rates. properties: + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/ApmDependencyStatsDataSource" env: @@ -4289,6 +4269,8 @@ components: description: >- A query for APM trace metrics such as hits, errors, and latency percentiles, aggregated across services. properties: + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/ApmMetricsDataSource" group_by: @@ -4439,6 +4421,8 @@ components: description: >- A query for APM resource statistics such as latency, error rate, and hit count, grouped by resource name. properties: + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/ApmResourceStatsDataSource" env: @@ -15258,6 +15242,8 @@ components: properties: aggregator: $ref: "#/components/schemas/MetricsAggregator" + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/ContainerDataSource" is_normalized_cpu: @@ -15295,6 +15281,8 @@ components: ContainerTimeseriesQuery: description: A query for container-level metrics such as CPU and memory usage. properties: + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/ContainerDataSource" is_normalized_cpu: @@ -18122,6 +18110,14 @@ components: nullable: true type: string type: object + CrossOrgUuids: + description: >- + Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + items: + description: An organization UUID. + type: string + maxItems: 1 + type: array CsmAgentData: description: Single Agent Data. properties: @@ -26178,6 +26174,8 @@ components: properties: compute: $ref: "#/components/schemas/EventsCompute" + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/EventsDataSource" group_by: @@ -26231,6 +26229,8 @@ components: properties: compute: $ref: "#/components/schemas/EventsCompute" + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/EventsDataSource" group_by: @@ -34692,158 +34692,6 @@ components: - SEV_3 - SEV_4 - SEV_5 - IncidentTeamCreateAttributes: - description: The incident team's attributes for a create request. - properties: - name: - description: Name of the incident team. - example: "team name" - type: string - required: - - name - type: object - IncidentTeamCreateData: - description: Incident Team data for a create request. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamCreateAttributes" - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - required: - - type - type: object - IncidentTeamCreateRequest: - description: Create request with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamCreateData" - required: - - data - type: object - IncidentTeamIncludedItems: - description: An object related to an incident team which is present in the included payload. - oneOf: - - $ref: "#/components/schemas/User" - IncidentTeamRelationships: - description: The incident team's relationships. - properties: - created_by: - $ref: "#/components/schemas/RelationshipToUser" - last_modified_by: - $ref: "#/components/schemas/RelationshipToUser" - readOnly: true - type: object - IncidentTeamResponse: - description: Response with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamResponseData" - included: - description: Included objects from relationships. - items: - $ref: "#/components/schemas/IncidentTeamIncludedItems" - readOnly: true - type: array - required: - - data - type: object - IncidentTeamResponseAttributes: - description: The incident team's attributes from a response. - properties: - created: - description: Timestamp of when the incident team was created. - format: date-time - readOnly: true - type: string - modified: - description: Timestamp of when the incident team was modified. - format: date-time - readOnly: true - type: string - name: - description: Name of the incident team. - example: "team name" - type: string - type: object - IncidentTeamResponseData: - description: Incident Team data from a response. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamResponseAttributes" - id: - description: The incident team's ID. - example: "00000000-7ea3-0000-000a-000000000000" - type: string - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - type: object - IncidentTeamType: - default: teams - description: Incident Team resource type. - enum: - - teams - example: teams - type: string - x-enum-varnames: - - TEAMS - IncidentTeamUpdateAttributes: - description: The incident team's attributes for an update request. - properties: - name: - description: Name of the incident team. - example: "team name" - type: string - required: - - name - type: object - IncidentTeamUpdateData: - description: Incident Team data for an update request. - properties: - attributes: - $ref: "#/components/schemas/IncidentTeamUpdateAttributes" - id: - description: The incident team's ID. - example: "00000000-7ea3-0000-0001-000000000000" - type: string - relationships: - $ref: "#/components/schemas/IncidentTeamRelationships" - type: - $ref: "#/components/schemas/IncidentTeamType" - required: - - type - type: object - IncidentTeamUpdateRequest: - description: Update request with an incident team payload. - properties: - data: - $ref: "#/components/schemas/IncidentTeamUpdateData" - required: - - data - type: object - IncidentTeamsResponse: - description: Response with a list of incident team payloads. - properties: - data: - description: An array of incident teams. - example: [{"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0000-000000000000", "type": "teams"}] - items: - $ref: "#/components/schemas/IncidentTeamResponseData" - type: array - included: - description: Included related resources which the user requested. - items: - $ref: "#/components/schemas/IncidentTeamIncludedItems" - readOnly: true - type: array - meta: - $ref: "#/components/schemas/IncidentResponseMeta" - required: - - data - type: "object" IncidentTimelineCellCreateAttributes: description: The timeline cell's attributes for a create request. oneOf: @@ -37230,6 +37078,15 @@ components: description: Search query following the event search syntax. example: "service:orders-* AND @language:go" type: string + states: + description: Filter issues by state. Multiple values are combined with OR logic. + example: + - "OPEN" + - "ACKNOWLEDGED" + items: + $ref: "#/components/schemas/IssueState" + maxItems: 20 + type: array team_ids: description: Filter issues by team IDs. Multiple values are combined with OR logic. example: @@ -44132,6 +43989,8 @@ components: properties: aggregator: $ref: "#/components/schemas/MetricsAggregator" + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/MetricsDataSource" name: @@ -44149,6 +44008,8 @@ components: MetricsTimeseriesQuery: description: A query against Datadog custom metrics or Cloud Cost data sources. properties: + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/MetricsDataSource" name: @@ -55263,6 +55124,8 @@ components: properties: aggregator: $ref: "#/components/schemas/MetricsAggregator" + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/ProcessDataSource" is_normalized_cpu: @@ -55386,6 +55249,8 @@ components: ProcessTimeseriesQuery: description: A query for host-level process metrics such as CPU and memory usage. properties: + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/ProcessDataSource" is_normalized_cpu: @@ -69793,6 +69658,8 @@ components: description: Additional filters applied to the SLO query. example: "host:host_a,env:prod" type: string + cross_org_uuids: + $ref: "#/components/schemas/CrossOrgUuids" data_source: $ref: "#/components/schemas/SloDataSource" group_mode: @@ -143077,276 +142944,6 @@ paths: operator: OR permissions: - teams_read - /api/v2/teams: - get: - deprecated: true - description: >- - Get all incident teams for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident teams. - operationId: ListIncidentTeams - parameters: - - $ref: "#/components/parameters/IncidentTeamIncludeQueryParameter" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/PageOffset" - - $ref: "#/components/parameters/IncidentTeamSearchQueryParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000002 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamsResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_read - summary: Get a list of all incident teams - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_read - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - post: - deprecated: true - description: Creates a new incident team. - operationId: CreateIncidentTeam - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - relationships: - created_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - last_modified_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamCreateRequest" - description: Incident Team Payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000001 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: CREATED - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Create a new incident team - tags: - - Incident Teams - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - /api/v2/teams/{team_id}: - delete: - deprecated: true - description: Deletes an existing incident team. - operationId: DeleteIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - responses: - "204": - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Delete an existing incident team - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - get: - deprecated: true - description: |- - Get details of an incident team. If the `include[users]` query parameter is provided, - the included attribute will contain the users related to these incident teams. - operationId: GetIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - - $ref: "#/components/parameters/IncidentTeamIncludeQueryParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000004 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_read - summary: Get details of an incident team - tags: - - Incident Teams - "x-permission": - operator: OR - permissions: - - incident_read - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). - patch: - deprecated: true - description: >- - Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. - operationId: UpdateIncidentTeam - parameters: - - $ref: "#/components/parameters/IncidentTeamIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-7ea3-0000-0001-000000000000 - relationships: - created_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - last_modified_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamUpdateRequest" - description: Incident Team Payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: team name - id: 00000000-0000-0000-0000-000000000003 - type: teams - schema: - $ref: "#/components/schemas/IncidentTeamResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Update an existing incident team - tags: - - Incident Teams - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/). /api/v2/test/flaky-test-management/tests: patch: description: |- @@ -146084,8 +145681,6 @@ tags: name: IP Allowlist - description: Create, update, delete, and retrieve services which can be associated with incidents. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. name: Incident Services - - description: The Incident Teams endpoints are deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/) to create, update, delete, and retrieve teams which can be associated with incidents. - name: Incident Teams - description: Manage incident response, as well as associated attachments, metadata, and todos. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. name: Incidents - description: |- diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-point-plot-widget.frozen b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-point-plot-widget.frozen new file mode 100644 index 000000000000..8f6732ce1241 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-point-plot-widget.frozen @@ -0,0 +1 @@ +2026-04-30T15:58:43.378Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-point-plot-widget.yml b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-point-plot-widget.yml new file mode 100644 index 000000000000..8b6740280588 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-point-plot-widget.yml @@ -0,0 +1,43 @@ +http_interactions: +- recorded_at: Thu, 30 Apr 2026 15:58:43 GMT + request: + body: + encoding: UTF-8 + string: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_point_plot_widget-1777564723","widgets":[{"definition":{"requests":[{"projection":{"dimensions":[{"column":"host","dimension":"group"},{"column":"@duration","dimension":"y"}],"type":"point_plot"},"query":{"data_source":"logs","query_string":"service:web-store"},"request_type":"data_projection"}],"title":"","title_align":"left","title_size":"16","type":"point_plot"}}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + encoding: UTF-8 + string: '{"id":"w8g-9wi-uav","title":"Test-Create_a_new_dashboard_with_point_plot_widget-1777564723","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI + Account","layout_type":"ordered","url":"/dashboard/w8g-9wi-uav/test-createanewdashboardwithpointplotwidget-1777564723","template_variables":null,"widgets":[{"definition":{"requests":[{"projection":{"dimensions":[{"column":"host","dimension":"group"},{"column":"@duration","dimension":"y"}],"type":"point_plot"},"query":{"data_source":"logs","query_string":"service:web-store"},"request_type":"data_projection"}],"title":"","title_align":"left","title_size":"16","type":"point_plot"},"id":1386353259406476}],"notify_list":null,"created_at":"2026-04-30T15:58:43.645158+00:00","modified_at":"2026-04-30T15:58:43.645158+00:00","restricted_roles":[]}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Thu, 30 Apr 2026 15:58:43 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/w8g-9wi-uav + response: + body: + encoding: UTF-8 + string: '{"deleted_dashboard_id":"w8g-9wi-uav"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen b/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen deleted file mode 100644 index 1d02b7f5cbe4..000000000000 --- a/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:33.507Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.yml b/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.yml deleted file mode 100644 index f4952c3ff6d9..000000000000 --- a/cassettes/features/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.yml +++ /dev/null @@ -1,44 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"teams","id":"ad2b4266-f087-5b33-9da5-e726f61fd9b0","attributes":{"name":"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973","created":"2023-11-06T21:59:33.756628+00:00","modified":"2023-11-06T21:59:33.756628+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"}}}},"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","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/ad2b4266-f087-5b33-9da5-e726f61fd9b0 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen b/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen deleted file mode 100644 index ddd60cfaeeb2..000000000000 --- a/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:33.925Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.yml b/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.yml deleted file mode 100644 index f1756c0461fe..000000000000 --- a/cassettes/features/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.yml +++ /dev/null @@ -1,62 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"teams","id":"a5250cc2-827f-509c-8159-2e0ccfb43cd3","attributes":{"name":"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973","created":"2023-11-06T21:59:34.043971+00:00","modified":"2023-11-06T21:59:34.043971+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"}}}},"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","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -- recorded_at: Mon, 06 Nov 2023 21:59:33 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen b/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen deleted file mode 100644 index fe3e133ecee2..000000000000 --- a/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:34.298Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.yml b/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.yml deleted file mode 100644 index 7854ab68856e..000000000000 --- a/cassettes/features/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.yml +++ /dev/null @@ -1,64 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"teams","id":"7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8","attributes":{"name":"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974","created":"2023-11-06T21:59:34.424755+00:00","modified":"2023-11-06T21:59:34.424755+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"}}}},"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","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/teams?filter=Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974 - response: - body: - encoding: UTF-8 - string: '{"data":[{"type":"teams","id":"7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8","attributes":{"name":"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974","created":"2023-11-06T21:59:34.424755+00:00","modified":"2023-11-06T21:59:34.424755+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"}}}}],"meta":{"pagination":{"offset":0,"next_offset":1,"size":1,"total":3852},"sort":"ASC","total":3852}} - - ' - headers: - Content-Type: - - application/json - status: - code: 200 - message: OK -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen b/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen deleted file mode 100644 index 5791822adeb6..000000000000 --- a/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:34.734Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.yml b/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.yml deleted file mode 100644 index c3c367540ada..000000000000 --- a/cassettes/features/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.yml +++ /dev/null @@ -1,64 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"teams","id":"98da5ea5-4d67-5296-b971-b8cd48f3e5f3","attributes":{"name":"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974","created":"2023-11-06T21:59:34.850054+00:00","modified":"2023-11-06T21:59:34.850054+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"}}}},"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","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3 - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"teams","id":"98da5ea5-4d67-5296-b971-b8cd48f3e5f3","attributes":{"name":"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974","created":"2023-11-06T21:59:34.850054+00:00","modified":"2023-11-06T21:59:34.850054+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: - Content-Type: - - application/json - status: - code: 200 - message: OK -- recorded_at: Mon, 06 Nov 2023 21:59:34 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3 - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen b/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen deleted file mode 100644 index 95003d7bde74..000000000000 --- a/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-11-06T21:59:35.100Z \ No newline at end of file diff --git a/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.yml b/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.yml deleted file mode 100644 index ebcf9e5fc773..000000000000 --- a/cassettes/features/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.yml +++ /dev/null @@ -1,68 +0,0 @@ -http_interactions: -- recorded_at: Mon, 06 Nov 2023 21:59:35 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/teams - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"teams","id":"90c4f5c8-5965-533e-8b56-cffad17e03bf","attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975","created":"2023-11-06T21:59:35.219247+00:00","modified":"2023-11-06T21:59:35.219247+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"}}}},"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","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Mon, 06 Nov 2023 21:59:35 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated"},"type":"teams"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: PATCH - uri: https://api.datadoghq.com/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"teams","id":"90c4f5c8-5965-533e-8b56-cffad17e03bf","attributes":{"name":"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated","created":"2023-11-06T21:59:35.219247+00:00","modified":"2023-11-06T21:59:35.364568+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"}}}},"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","modified_at":"2020-06-15T12:33:12.884459+00:00","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"},"relationships":{"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}]} - - ' - headers: - Content-Type: - - application/json - status: - code: 200 - message: OK -- recorded_at: Mon, 06 Nov 2023 21:59:35 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf - response: - body: - encoding: UTF-8 - string: '' - headers: - Content-Type: - - text/html; charset=utf-8 - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/examples/v1/dashboards/CreateDashboard_2049446128.rb b/examples/v1/dashboards/CreateDashboard_2049446128.rb new file mode 100644 index 000000000000..80ad61d5ca9f --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2049446128.rb @@ -0,0 +1,42 @@ +# Create a new dashboard with point_plot widget + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::DashboardsAPI.new + +body = DatadogAPIClient::V1::Dashboard.new({ + title: "Example-Dashboard", + layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED, + widgets: [ + DatadogAPIClient::V1::Widget.new({ + definition: DatadogAPIClient::V1::PointPlotWidgetDefinition.new({ + title: "", + title_size: "16", + title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT, + type: DatadogAPIClient::V1::PointPlotWidgetDefinitionType::POINT_PLOT, + requests: [ + DatadogAPIClient::V1::PointPlotWidgetRequest.new({ + request_type: DatadogAPIClient::V1::DataProjectionRequestType::DATA_PROJECTION, + query: DatadogAPIClient::V1::DataProjectionQuery.new({ + query_string: "service:web-store", + data_source: "logs", + }), + projection: DatadogAPIClient::V1::PointPlotProjection.new({ + type: DatadogAPIClient::V1::PointPlotProjectionType::POINT_PLOT, + dimensions: [ + DatadogAPIClient::V1::PointPlotProjectionDimension.new({ + column: "host", + dimension: DatadogAPIClient::V1::PointPlotDimension::GROUP, + }), + DatadogAPIClient::V1::PointPlotProjectionDimension.new({ + column: "@duration", + dimension: DatadogAPIClient::V1::PointPlotDimension::Y, + }), + ], + }), + }), + ], + }), + }), + ], +}) +p api_instance.create_dashboard(body) diff --git a/examples/v2/incident-teams/CreateIncidentTeam.rb b/examples/v2/incident-teams/CreateIncidentTeam.rb deleted file mode 100644 index d0ae4a25ecc0..000000000000 --- a/examples/v2/incident-teams/CreateIncidentTeam.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Create a new incident team returns "CREATED" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_incident_team".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -body = DatadogAPIClient::V2::IncidentTeamCreateRequest.new({ - data: DatadogAPIClient::V2::IncidentTeamCreateData.new({ - type: DatadogAPIClient::V2::IncidentTeamType::TEAMS, - attributes: DatadogAPIClient::V2::IncidentTeamCreateAttributes.new({ - name: "Example-Incident-Team", - }), - }), -}) -p api_instance.create_incident_team(body) diff --git a/examples/v2/incident-teams/DeleteIncidentTeam.rb b/examples/v2/incident-teams/DeleteIncidentTeam.rb deleted file mode 100644 index 116b10154b96..000000000000 --- a/examples/v2/incident-teams/DeleteIncidentTeam.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Delete an existing incident team returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_incident_team".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -# there is a valid "team" in the system -TEAM_DATA_ID = ENV["TEAM_DATA_ID"] -api_instance.delete_incident_team(TEAM_DATA_ID) diff --git a/examples/v2/incident-teams/GetIncidentTeam.rb b/examples/v2/incident-teams/GetIncidentTeam.rb deleted file mode 100644 index ab9270baa977..000000000000 --- a/examples/v2/incident-teams/GetIncidentTeam.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Get details of an incident team returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_incident_team".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -# there is a valid "team" in the system -TEAM_DATA_ID = ENV["TEAM_DATA_ID"] -p api_instance.get_incident_team(TEAM_DATA_ID) diff --git a/examples/v2/incident-teams/ListIncidentTeams.rb b/examples/v2/incident-teams/ListIncidentTeams.rb deleted file mode 100644 index efddef6118b8..000000000000 --- a/examples/v2/incident-teams/ListIncidentTeams.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Get a list of all incident teams returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_incident_teams".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -# there is a valid "team" in the system -TEAM_DATA_ATTRIBUTES_NAME = ENV["TEAM_DATA_ATTRIBUTES_NAME"] -opts = { - filter: TEAM_DATA_ATTRIBUTES_NAME, -} -p api_instance.list_incident_teams(opts) diff --git a/examples/v2/incident-teams/UpdateIncidentTeam.rb b/examples/v2/incident-teams/UpdateIncidentTeam.rb deleted file mode 100644 index 99e7000500d1..000000000000 --- a/examples/v2/incident-teams/UpdateIncidentTeam.rb +++ /dev/null @@ -1,21 +0,0 @@ -# Update an existing incident team returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_incident_team".to_sym] = true -end -api_instance = DatadogAPIClient::V2::IncidentTeamsAPI.new - -# there is a valid "team" in the system -TEAM_DATA_ATTRIBUTES_NAME = ENV["TEAM_DATA_ATTRIBUTES_NAME"] -TEAM_DATA_ID = ENV["TEAM_DATA_ID"] - -body = DatadogAPIClient::V2::IncidentTeamUpdateRequest.new({ - data: DatadogAPIClient::V2::IncidentTeamUpdateData.new({ - type: DatadogAPIClient::V2::IncidentTeamType::TEAMS, - attributes: DatadogAPIClient::V2::IncidentTeamUpdateAttributes.new({ - name: "team name-updated", - }), - }), -}) -p api_instance.update_incident_team(TEAM_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index a0c4193084bc..bb9f839f53de 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -4608,26 +4608,6 @@ "v2.GetUserMemberships" => { "user_uuid" => "String", }, - "v2.ListIncidentTeams" => { - "include" => "IncidentRelatedObject", - "page_size" => "Integer", - "page_offset" => "Integer", - "filter" => "String", - }, - "v2.CreateIncidentTeam" => { - "body" => "IncidentTeamCreateRequest", - }, - "v2.DeleteIncidentTeam" => { - "team_id" => "String", - }, - "v2.GetIncidentTeam" => { - "team_id" => "String", - "include" => "IncidentRelatedObject", - }, - "v2.UpdateIncidentTeam" => { - "team_id" => "String", - "body" => "IncidentTeamUpdateRequest", - }, "v2.SearchWidgets" => { "experience_type" => "WidgetExperienceType", "filter_widget_type" => "WidgetType", diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index 2541faab2d19..655b599b89b5 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -739,6 +739,18 @@ Feature: Dashboards And the response "widgets[0].definition.type" is equal to "note" And the response "widgets[0].definition.content" is equal to "# Example Note" + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with point_plot widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/point_plot_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "point_plot" + And the response "widgets[0].definition.requests[0].request_type" is equal to "data_projection" + And the response "widgets[0].definition.requests[0].projection.type" is equal to "point_plot" + And the response "widgets[0].definition.requests[0].projection.dimensions[0].dimension" is equal to "group" + And the response "widgets[0].definition.requests[0].projection.dimensions[1].dimension" is equal to "y" + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with powerpack widget Given new "CreateDashboard" request diff --git a/features/v1/dashboards_json_payload/point_plot_widget.json b/features/v1/dashboards_json_payload/point_plot_widget.json new file mode 100644 index 000000000000..c8e340c70789 --- /dev/null +++ b/features/v1/dashboards_json_payload/point_plot_widget.json @@ -0,0 +1,36 @@ +{ + "title": "{{ unique }}", + "layout_type": "ordered", + "widgets": [ + { + "definition": { + "title": "", + "title_size": "16", + "title_align": "left", + "type": "point_plot", + "requests": [ + { + "request_type": "data_projection", + "query": { + "query_string": "service:web-store", + "data_source": "logs" + }, + "projection": { + "type": "point_plot", + "dimensions": [ + { + "column": "host", + "dimension": "group" + }, + { + "column": "@duration", + "dimension": "y" + } + ] + } + } + ] + } + } + ] +} diff --git a/features/v2/given.json b/features/v2/given.json index 98e2edab7a17..48979b4fe7be 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1533,18 +1533,6 @@ "tag": "Teams", "operationId": "CreateTeamNotificationRule" }, - { - "parameters": [ - { - "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\"\n },\n \"type\": \"teams\"\n }\n}" - } - ], - "step": "there is a valid \"team\" in the system", - "key": "team", - "tag": "Incident Teams", - "operationId": "CreateIncidentTeam" - }, { "parameters": [ { diff --git a/features/v2/incident_teams.feature b/features/v2/incident_teams.feature deleted file mode 100644 index 5bbb4926393c..000000000000 --- a/features/v2/incident_teams.feature +++ /dev/null @@ -1,146 +0,0 @@ -@endpoint(incident-teams) @endpoint(incident-teams-v2) -Feature: Incident Teams - The Incident Teams endpoints are deprecated. See the [Teams API - endpoints](https://docs.datadoghq.com/api/latest/teams/) to create, - update, delete, and retrieve teams which can be associated with incidents. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "IncidentTeams" API - - @generated @skip @team:Datadog/incident-app - Scenario: Create a new incident team returns "Bad Request" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"attributes": {"name": "team name"}, "type": "teams"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:Datadog/incident-app - Scenario: Create a new incident team returns "CREATED" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"type": "teams", "attributes": {"name": "{{ unique }}"}}} - When the request is sent - Then the response status is 201 CREATED - And the response "data.type" is equal to "teams" - And the response "data.attributes.name" is equal to "{{ unique }}" - - @generated @skip @team:Datadog/incident-app - Scenario: Create a new incident team returns "Not Found" response - Given operation "CreateIncidentTeam" enabled - And new "CreateIncidentTeam" request - And body with value {"data": {"attributes": {"name": "team name"}, "type": "teams"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "Bad Request" response - Given operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "Not Found" response - Given operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Delete an existing incident team returns "OK" response - Given there is a valid "team" in the system - And operation "DeleteIncidentTeam" enabled - And new "DeleteIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - When the request is sent - Then the response status is 204 OK - - @generated @skip @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "Bad Request" response - Given operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "Not Found" response - Given operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Get a list of all incident teams returns "OK" response - Given there is a valid "team" in the system - And operation "ListIncidentTeams" enabled - And new "ListIncidentTeams" request - And request contains "filter" parameter from "team.data.attributes.name" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].type" is equal to "teams" - And the response "data[0].attributes.name" has the same value as "team.data.attributes.name" - - @generated @skip @team:Datadog/incident-app - Scenario: Get details of an incident team returns "Bad Request" response - Given operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Get details of an incident team returns "Not Found" response - Given operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Get details of an incident team returns "OK" response - Given there is a valid "team" in the system - And operation "GetIncidentTeam" enabled - And new "GetIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - When the request is sent - Then the response status is 200 OK - And the response "data.type" is equal to "teams" - And the response "data.id" is equal to "{{ team.data.id }}" - And the response "data.attributes.name" has the same value as "team.data.attributes.name" - - @generated @skip @team:Datadog/incident-app - Scenario: Update an existing incident team returns "Bad Request" response - Given operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0001-000000000000", "type": "teams"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Update an existing incident team returns "Not Found" response - Given operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0001-000000000000", "type": "teams"}} - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Update an existing incident team returns "OK" response - Given there is a valid "team" in the system - And operation "UpdateIncidentTeam" enabled - And new "UpdateIncidentTeam" request - And request contains "team_id" parameter from "team.data.id" - And body with value {"data": {"type": "teams", "attributes": {"name": "{{ team.data.attributes.name }}-updated"}}} - When the request is sent - Then the response status is 200 OK - And the response "data.type" is equal to "teams" - And the response "data.id" is equal to "{{ team.data.id }}" - And the response "data.attributes.name" is equal to "{{ team.data.attributes.name }}-updated" diff --git a/features/v2/undo.json b/features/v2/undo.json index 8f3cc28492de..a3e509a0bcb3 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -6964,43 +6964,6 @@ "type": "idempotent" } }, - "ListIncidentTeams": { - "tag": "Incident Teams", - "undo": { - "type": "safe" - } - }, - "CreateIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "operationId": "DeleteIncidentTeam", - "parameters": [ - { - "name": "team_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "idempotent" - } - }, - "GetIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "safe" - } - }, - "UpdateIncidentTeam": { - "tag": "Incident Teams", - "undo": { - "type": "idempotent" - } - }, "UpdateFlakyTests": { "tag": "Test Optimization", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 8860f22b1727..544b557cb4b3 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -462,11 +462,6 @@ def initialize "v2.add_member_team": false, "v2.list_member_teams": false, "v2.remove_member_team": false, - "v2.create_incident_team": false, - "v2.delete_incident_team": false, - "v2.get_incident_team": false, - "v2.list_incident_teams": false, - "v2.update_incident_team": false, } @server_variables[:site] = ENV['DD_SITE'] if ENV.key? 'DD_SITE' @api_key['apiKeyAuth'] = ENV['DD_API_KEY'] if ENV.key? 'DD_API_KEY' diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index cf3079d38d1a..2be62a16392b 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -103,6 +103,8 @@ def overrides "v1.dashboard_template_variable_preset" => "DashboardTemplateVariablePreset", "v1.dashboard_template_variable_preset_value" => "DashboardTemplateVariablePresetValue", "v1.dashboard_type" => "DashboardType", + "v1.data_projection_query" => "DataProjectionQuery", + "v1.data_projection_request_type" => "DataProjectionRequestType", "v1.deleted_monitor" => "DeletedMonitor", "v1.delete_shared_dashboard_response" => "DeleteSharedDashboardResponse", "v1.distribution_point_item" => "DistributionPointItem", @@ -493,6 +495,15 @@ def overrides "v1.pager_duty_service_key" => "PagerDutyServiceKey", "v1.pager_duty_service_name" => "PagerDutyServiceName", "v1.pagination" => "Pagination", + "v1.point_plot_dimension" => "PointPlotDimension", + "v1.point_plot_projection" => "PointPlotProjection", + "v1.point_plot_projection_dimension" => "PointPlotProjectionDimension", + "v1.point_plot_projection_type" => "PointPlotProjectionType", + "v1.point_plot_widget_definition" => "PointPlotWidgetDefinition", + "v1.point_plot_widget_definition_type" => "PointPlotWidgetDefinitionType", + "v1.point_plot_widget_legend" => "PointPlotWidgetLegend", + "v1.point_plot_widget_legend_type" => "PointPlotWidgetLegendType", + "v1.point_plot_widget_request" => "PointPlotWidgetRequest", "v1.powerpack_template_variable_contents" => "PowerpackTemplateVariableContents", "v1.powerpack_template_variables" => "PowerpackTemplateVariables", "v1.powerpack_widget_definition" => "PowerpackWidgetDefinition", @@ -3170,19 +3181,6 @@ def overrides "v2.incident_service_update_request" => "IncidentServiceUpdateRequest", "v2.incident_severity" => "IncidentSeverity", "v2.incidents_response" => "IncidentsResponse", - "v2.incident_team_create_attributes" => "IncidentTeamCreateAttributes", - "v2.incident_team_create_data" => "IncidentTeamCreateData", - "v2.incident_team_create_request" => "IncidentTeamCreateRequest", - "v2.incident_team_included_items" => "IncidentTeamIncludedItems", - "v2.incident_team_relationships" => "IncidentTeamRelationships", - "v2.incident_team_response" => "IncidentTeamResponse", - "v2.incident_team_response_attributes" => "IncidentTeamResponseAttributes", - "v2.incident_team_response_data" => "IncidentTeamResponseData", - "v2.incident_teams_response" => "IncidentTeamsResponse", - "v2.incident_team_type" => "IncidentTeamType", - "v2.incident_team_update_attributes" => "IncidentTeamUpdateAttributes", - "v2.incident_team_update_data" => "IncidentTeamUpdateData", - "v2.incident_team_update_request" => "IncidentTeamUpdateRequest", "v2.incident_timeline_cell_create_attributes" => "IncidentTimelineCellCreateAttributes", "v2.incident_timeline_cell_markdown_content_type" => "IncidentTimelineCellMarkdownContentType", "v2.incident_timeline_cell_markdown_create_attributes" => "IncidentTimelineCellMarkdownCreateAttributes", @@ -6435,7 +6433,6 @@ def overrides "v2.google_chat_integration_api" => "GoogleChatIntegrationAPI", "v2.high_availability_multi_region_api" => "HighAvailabilityMultiRegionAPI", "v2.incident_services_api" => "IncidentServicesAPI", - "v2.incident_teams_api" => "IncidentTeamsAPI", "v2.incidents_api" => "IncidentsAPI", "v2.integrations_api" => "IntegrationsAPI", "v2.ip_allowlist_api" => "IPAllowlistAPI", diff --git a/lib/datadog_api_client/v2/models/incident_teams_response.rb b/lib/datadog_api_client/v1/models/data_projection_query.rb similarity index 57% rename from lib/datadog_api_client/v2/models/incident_teams_response.rb rename to lib/datadog_api_client/v1/models/data_projection_query.rb index 30e03b61b990..839cc971fc22 100644 --- a/lib/datadog_api_client/v2/models/incident_teams_response.rb +++ b/lib/datadog_api_client/v1/models/data_projection_query.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,19 +16,22 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Response with a list of incident team payloads. - class IncidentTeamsResponse +module DatadogAPIClient::V1 + # Query configuration for a data projection request. + class DataProjectionQuery include BaseGenericModel - # An array of incident teams. - attr_reader :data + # Data source for the query. + attr_reader :data_source - # Included related resources which the user requested. - attr_accessor :included + # List of indexes to query. + attr_accessor :indexes - # The metadata object containing pagination metadata. - attr_accessor :meta + # The query string to filter events. + attr_reader :query_string + + # Storage location for the query. + attr_accessor :storage attr_accessor :additional_properties @@ -36,9 +39,10 @@ class IncidentTeamsResponse # @!visibility private def self.attribute_map { - :'data' => :'data', - :'included' => :'included', - :'meta' => :'meta' + :'data_source' => :'data_source', + :'indexes' => :'indexes', + :'query_string' => :'query_string', + :'storage' => :'storage' } end @@ -46,9 +50,10 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array', - :'included' => :'Array', - :'meta' => :'IncidentResponseMeta' + :'data_source' => :'String', + :'indexes' => :'Array', + :'query_string' => :'String', + :'storage' => :'String' } end @@ -57,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamsResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::DataProjectionQuery` initialize method" end self.additional_properties = {} @@ -70,20 +75,22 @@ def initialize(attributes = {}) end } - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] end - if attributes.key?(:'included') - if (value = attributes[:'included']).is_a?(Array) - self.included = value + if attributes.key?(:'indexes') + if (value = attributes[:'indexes']).is_a?(Array) + self.indexes = value end end - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] + if attributes.key?(:'query_string') + self.query_string = attributes[:'query_string'] + end + + if attributes.key?(:'storage') + self.storage = attributes[:'storage'] end end @@ -91,18 +98,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @data.nil? + return false if @data_source.nil? + return false if @query_string.nil? true end # Custom attribute writer method with validation - # @param data [Object] Object to be assigned + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param query_string [Object] Object to be assigned # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' + def query_string=(query_string) + if query_string.nil? + fail ArgumentError, 'invalid value for "query_string", query_string cannot be nil.' end - @data = data + @query_string = query_string end # Returns the object in the form of hash, with additionalProperties support. @@ -131,9 +149,10 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && - included == o.included && - meta == o.meta && + data_source == o.data_source && + indexes == o.indexes && + query_string == o.query_string && + storage == o.storage && additional_properties == o.additional_properties end @@ -141,7 +160,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, included, meta, additional_properties].hash + [data_source, indexes, query_string, storage, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/data_projection_request_type.rb b/lib/datadog_api_client/v1/models/data_projection_request_type.rb new file mode 100644 index 000000000000..aaa61a45d0b3 --- /dev/null +++ b/lib/datadog_api_client/v1/models/data_projection_request_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Type of a data projection request. + class DataProjectionRequestType + include BaseEnumModel + + DATA_PROJECTION = "data_projection".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/point_plot_dimension.rb b/lib/datadog_api_client/v1/models/point_plot_dimension.rb new file mode 100644 index 000000000000..3bbb51ba9686 --- /dev/null +++ b/lib/datadog_api_client/v1/models/point_plot_dimension.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Dimension of the point plot. + class PointPlotDimension + include BaseEnumModel + + GROUP = "group".freeze + TIME = "time".freeze + Y = "y".freeze + RADIUS = "radius".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_team_update_data.rb b/lib/datadog_api_client/v1/models/point_plot_projection.rb similarity index 68% rename from lib/datadog_api_client/v2/models/incident_team_update_data.rb rename to lib/datadog_api_client/v1/models/point_plot_projection.rb index 2a5ce5957911..cd799de3cafb 100644 --- a/lib/datadog_api_client/v2/models/incident_team_update_data.rb +++ b/lib/datadog_api_client/v1/models/point_plot_projection.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,21 +16,18 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Incident Team data for an update request. - class IncidentTeamUpdateData +module DatadogAPIClient::V1 + # Projection configuration for the point plot widget. + class PointPlotProjection include BaseGenericModel - # The incident team's attributes for an update request. - attr_accessor :attributes + # List of dimension mappings for the projection. + attr_reader :dimensions - # The incident team's ID. - attr_accessor :id + # Additional columns to include in the projection. + attr_accessor :extra_columns - # The incident team's relationships. - attr_accessor :relationships - - # Incident Team resource type. + # Type of the projection. attr_reader :type attr_accessor :additional_properties @@ -39,9 +36,8 @@ class IncidentTeamUpdateData # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'id' => :'id', - :'relationships' => :'relationships', + :'dimensions' => :'dimensions', + :'extra_columns' => :'extra_columns', :'type' => :'type' } end @@ -50,10 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'IncidentTeamUpdateAttributes', - :'id' => :'String', - :'relationships' => :'IncidentTeamRelationships', - :'type' => :'IncidentTeamType' + :'dimensions' => :'Array', + :'extra_columns' => :'Array', + :'type' => :'PointPlotProjectionType' } end @@ -62,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PointPlotProjection` initialize method" end self.additional_properties = {} @@ -75,16 +70,16 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] + if attributes.key?(:'dimensions') + if (value = attributes[:'dimensions']).is_a?(Array) + self.dimensions = value + end end - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] + if attributes.key?(:'extra_columns') + if (value = attributes[:'extra_columns']).is_a?(Array) + self.extra_columns = value + end end if attributes.key?(:'type') @@ -96,10 +91,21 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @dimensions.nil? return false if @type.nil? true end + # Custom attribute writer method with validation + # @param dimensions [Object] Object to be assigned + # @!visibility private + def dimensions=(dimensions) + if dimensions.nil? + fail ArgumentError, 'invalid value for "dimensions", dimensions cannot be nil.' + end + @dimensions = dimensions + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -136,9 +142,8 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && - id == o.id && - relationships == o.relationships && + dimensions == o.dimensions && + extra_columns == o.extra_columns && type == o.type && additional_properties == o.additional_properties end @@ -147,7 +152,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, relationships, type, additional_properties].hash + [dimensions, extra_columns, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/incident_team_create_data.rb b/lib/datadog_api_client/v1/models/point_plot_projection_dimension.rb similarity index 63% rename from lib/datadog_api_client/v2/models/incident_team_create_data.rb rename to lib/datadog_api_client/v1/models/point_plot_projection_dimension.rb index 65c77ac6a22f..c50b9ddc450e 100644 --- a/lib/datadog_api_client/v2/models/incident_team_create_data.rb +++ b/lib/datadog_api_client/v1/models/point_plot_projection_dimension.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,19 +16,19 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Incident Team data for a create request. - class IncidentTeamCreateData +module DatadogAPIClient::V1 + # Dimension mapping for the point plot projection. + class PointPlotProjectionDimension include BaseGenericModel - # The incident team's attributes for a create request. - attr_accessor :attributes + # Alias for the column. + attr_accessor :_alias - # The incident team's relationships. - attr_accessor :relationships + # Source column name from the dataset. + attr_reader :column - # Incident Team resource type. - attr_reader :type + # Dimension of the point plot. + attr_reader :dimension attr_accessor :additional_properties @@ -36,9 +36,9 @@ class IncidentTeamCreateData # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'relationships' => :'relationships', - :'type' => :'type' + :'_alias' => :'alias', + :'column' => :'column', + :'dimension' => :'dimension' } end @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'IncidentTeamCreateAttributes', - :'relationships' => :'IncidentTeamRelationships', - :'type' => :'IncidentTeamType' + :'_alias' => :'String', + :'column' => :'String', + :'dimension' => :'PointPlotDimension' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PointPlotProjectionDimension` initialize method" end self.additional_properties = {} @@ -70,16 +70,16 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'_alias') + self._alias = attributes[:'_alias'] end - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] + if attributes.key?(:'column') + self.column = attributes[:'column'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'dimension') + self.dimension = attributes[:'dimension'] end end @@ -87,18 +87,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @type.nil? + return false if @column.nil? + return false if @dimension.nil? true end # Custom attribute writer method with validation - # @param type [Object] Object to be assigned + # @param column [Object] Object to be assigned # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' + def column=(column) + if column.nil? + fail ArgumentError, 'invalid value for "column", column cannot be nil.' end - @type = type + @column = column + end + + # Custom attribute writer method with validation + # @param dimension [Object] Object to be assigned + # @!visibility private + def dimension=(dimension) + if dimension.nil? + fail ArgumentError, 'invalid value for "dimension", dimension cannot be nil.' + end + @dimension = dimension end # Returns the object in the form of hash, with additionalProperties support. @@ -127,9 +138,9 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && - relationships == o.relationships && - type == o.type && + _alias == o._alias && + column == o.column && + dimension == o.dimension && additional_properties == o.additional_properties end @@ -137,7 +148,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, relationships, type, additional_properties].hash + [_alias, column, dimension, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/incident_team_type.rb b/lib/datadog_api_client/v1/models/point_plot_projection_type.rb similarity index 77% rename from lib/datadog_api_client/v2/models/incident_team_type.rb rename to lib/datadog_api_client/v1/models/point_plot_projection_type.rb index 29e1020af05c..5095365be490 100644 --- a/lib/datadog_api_client/v2/models/incident_team_type.rb +++ b/lib/datadog_api_client/v1/models/point_plot_projection_type.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,11 +16,11 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Incident Team resource type. - class IncidentTeamType +module DatadogAPIClient::V1 + # Type of the projection. + class PointPlotProjectionType include BaseEnumModel - TEAMS = "teams".freeze + POINT_PLOT = "point_plot".freeze end end diff --git a/lib/datadog_api_client/v1/models/point_plot_widget_definition.rb b/lib/datadog_api_client/v1/models/point_plot_widget_definition.rb new file mode 100644 index 000000000000..21f2542ba4db --- /dev/null +++ b/lib/datadog_api_client/v1/models/point_plot_widget_definition.rb @@ -0,0 +1,240 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # The point plot displays individual data points over time. + class PointPlotWidgetDefinition + include BaseGenericModel + + # List of custom links. + attr_accessor :custom_links + + # The description of the widget. + attr_accessor :description + + # Legend configuration for the point plot widget. + attr_accessor :legend + + # List of markers for the widget. + attr_accessor :markers + + # List of request configurations for the widget. + attr_reader :requests + + # Time setting for the widget. + attr_accessor :time + + # Title of the widget. + attr_accessor :title + + # How to align the text on the widget. + attr_accessor :title_align + + # Size of the title. + attr_accessor :title_size + + # Type of the point plot widget. + attr_reader :type + + # Axis controls for the widget. + attr_accessor :yaxis + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'custom_links' => :'custom_links', + :'description' => :'description', + :'legend' => :'legend', + :'markers' => :'markers', + :'requests' => :'requests', + :'time' => :'time', + :'title' => :'title', + :'title_align' => :'title_align', + :'title_size' => :'title_size', + :'type' => :'type', + :'yaxis' => :'yaxis' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'custom_links' => :'Array', + :'description' => :'String', + :'legend' => :'PointPlotWidgetLegend', + :'markers' => :'Array', + :'requests' => :'Array', + :'time' => :'WidgetTime', + :'title' => :'String', + :'title_align' => :'WidgetTextAlign', + :'title_size' => :'String', + :'type' => :'PointPlotWidgetDefinitionType', + :'yaxis' => :'WidgetAxis' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PointPlotWidgetDefinition` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'custom_links') + if (value = attributes[:'custom_links']).is_a?(Array) + self.custom_links = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'legend') + self.legend = attributes[:'legend'] + end + + if attributes.key?(:'markers') + if (value = attributes[:'markers']).is_a?(Array) + self.markers = value + end + end + + if attributes.key?(:'requests') + if (value = attributes[:'requests']).is_a?(Array) + self.requests = value + end + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'title_align') + self.title_align = attributes[:'title_align'] + end + + if attributes.key?(:'title_size') + self.title_size = attributes[:'title_size'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'yaxis') + self.yaxis = attributes[:'yaxis'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @requests.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param requests [Object] Object to be assigned + # @!visibility private + def requests=(requests) + if requests.nil? + fail ArgumentError, 'invalid value for "requests", requests cannot be nil.' + end + @requests = requests + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + custom_links == o.custom_links && + description == o.description && + legend == o.legend && + markers == o.markers && + requests == o.requests && + time == o.time && + title == o.title && + title_align == o.title_align && + title_size == o.title_size && + type == o.type && + yaxis == o.yaxis && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [custom_links, description, legend, markers, requests, time, title, title_align, title_size, type, yaxis, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/point_plot_widget_definition_type.rb b/lib/datadog_api_client/v1/models/point_plot_widget_definition_type.rb new file mode 100644 index 000000000000..0a21d6f7d6b5 --- /dev/null +++ b/lib/datadog_api_client/v1/models/point_plot_widget_definition_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Type of the point plot widget. + class PointPlotWidgetDefinitionType + include BaseEnumModel + + POINT_PLOT = "point_plot".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_team_create_request.rb b/lib/datadog_api_client/v1/models/point_plot_widget_legend.rb similarity index 79% rename from lib/datadog_api_client/v2/models/incident_team_create_request.rb rename to lib/datadog_api_client/v1/models/point_plot_widget_legend.rb index 4c8b26651729..161fdc5fbc38 100644 --- a/lib/datadog_api_client/v2/models/incident_team_create_request.rb +++ b/lib/datadog_api_client/v1/models/point_plot_widget_legend.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,13 +16,13 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Create request with an incident team payload. - class IncidentTeamCreateRequest +module DatadogAPIClient::V1 + # Legend configuration for the point plot widget. + class PointPlotWidgetLegend include BaseGenericModel - # Incident Team data for a create request. - attr_reader :data + # Type of legend to show for the point plot widget. + attr_reader :type attr_accessor :additional_properties @@ -30,7 +30,7 @@ class IncidentTeamCreateRequest # @!visibility private def self.attribute_map { - :'data' => :'data' + :'type' => :'type' } end @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'IncidentTeamCreateData' + :'type' => :'PointPlotWidgetLegendType' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PointPlotWidgetLegend` initialize method" end self.additional_properties = {} @@ -60,8 +60,8 @@ def initialize(attributes = {}) end } - if attributes.key?(:'data') - self.data = attributes[:'data'] + if attributes.key?(:'type') + self.type = attributes[:'type'] end end @@ -69,18 +69,18 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @data.nil? + return false if @type.nil? true end # Custom attribute writer method with validation - # @param data [Object] Object to be assigned + # @param type [Object] Object to be assigned # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' end - @data = data + @type = type end # Returns the object in the form of hash, with additionalProperties support. @@ -109,7 +109,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && + type == o.type && additional_properties == o.additional_properties end @@ -117,7 +117,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/point_plot_widget_legend_type.rb b/lib/datadog_api_client/v1/models/point_plot_widget_legend_type.rb new file mode 100644 index 000000000000..1463df62a281 --- /dev/null +++ b/lib/datadog_api_client/v1/models/point_plot_widget_legend_type.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Type of legend to show for the point plot widget. + class PointPlotWidgetLegendType + include BaseEnumModel + + AUTOMATIC = "automatic".freeze + NONE = "none".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_team_response.rb b/lib/datadog_api_client/v1/models/point_plot_widget_request.rb similarity index 53% rename from lib/datadog_api_client/v2/models/incident_team_response.rb rename to lib/datadog_api_client/v1/models/point_plot_widget_request.rb index 0034ab4b68b9..4e72a9cbc7ba 100644 --- a/lib/datadog_api_client/v2/models/incident_team_response.rb +++ b/lib/datadog_api_client/v1/models/point_plot_widget_request.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,16 +16,22 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Response with an incident team payload. - class IncidentTeamResponse +module DatadogAPIClient::V1 + # Request configuration for the point plot widget. + class PointPlotWidgetRequest include BaseGenericModel - # Incident Team data from a response. - attr_reader :data + # Maximum number of data points to return. + attr_accessor :limit - # Included objects from relationships. - attr_accessor :included + # Projection configuration for the point plot widget. + attr_reader :projection + + # Query configuration for a data projection request. + attr_reader :query + + # Type of a data projection request. + attr_reader :request_type attr_accessor :additional_properties @@ -33,8 +39,10 @@ class IncidentTeamResponse # @!visibility private def self.attribute_map { - :'data' => :'data', - :'included' => :'included' + :'limit' => :'limit', + :'projection' => :'projection', + :'query' => :'query', + :'request_type' => :'request_type' } end @@ -42,8 +50,10 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'IncidentTeamResponseData', - :'included' => :'Array' + :'limit' => :'Integer', + :'projection' => :'PointPlotProjection', + :'query' => :'DataProjectionQuery', + :'request_type' => :'DataProjectionRequestType' } end @@ -52,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::PointPlotWidgetRequest` initialize method" end self.additional_properties = {} @@ -65,14 +75,20 @@ def initialize(attributes = {}) end } - if attributes.key?(:'data') - self.data = attributes[:'data'] + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] end - if attributes.key?(:'included') - if (value = attributes[:'included']).is_a?(Array) - self.included = value - end + if attributes.key?(:'projection') + self.projection = attributes[:'projection'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'request_type') + self.request_type = attributes[:'request_type'] end end @@ -80,18 +96,40 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @data.nil? + return false if @projection.nil? + return false if @query.nil? + return false if @request_type.nil? true end # Custom attribute writer method with validation - # @param data [Object] Object to be assigned + # @param projection [Object] Object to be assigned + # @!visibility private + def projection=(projection) + if projection.nil? + fail ArgumentError, 'invalid value for "projection", projection cannot be nil.' + end + @projection = projection + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # Custom attribute writer method with validation + # @param request_type [Object] Object to be assigned # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' + def request_type=(request_type) + if request_type.nil? + fail ArgumentError, 'invalid value for "request_type", request_type cannot be nil.' end - @data = data + @request_type = request_type end # Returns the object in the form of hash, with additionalProperties support. @@ -120,8 +158,10 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && - included == o.included && + limit == o.limit && + projection == o.projection && + query == o.query && + request_type == o.request_type && additional_properties == o.additional_properties end @@ -129,7 +169,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, included, additional_properties].hash + [limit, projection, query, request_type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/widget_definition.rb b/lib/datadog_api_client/v1/models/widget_definition.rb index e72c14a8a531..89775bb92640 100644 --- a/lib/datadog_api_client/v1/models/widget_definition.rb +++ b/lib/datadog_api_client/v1/models/widget_definition.rb @@ -49,6 +49,7 @@ def openapi_one_of :'MonitorSummaryWidgetDefinition', :'NoteWidgetDefinition', :'PowerpackWidgetDefinition', + :'PointPlotWidgetDefinition', :'QueryValueWidgetDefinition', :'RetentionCurveWidgetDefinition', :'RunWorkflowWidgetDefinition', diff --git a/lib/datadog_api_client/v2/api/incident_teams_api.rb b/lib/datadog_api_client/v2/api/incident_teams_api.rb deleted file mode 100644 index 93df27f0f80e..000000000000 --- a/lib/datadog_api_client/v2/api/incident_teams_api.rb +++ /dev/null @@ -1,419 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'cgi' - -module DatadogAPIClient::V2 - class IncidentTeamsAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Create a new incident team. - # - # @see #create_incident_team_with_http_info - def create_incident_team(body, opts = {}) - data, _status_code, _headers = create_incident_team_with_http_info(body, opts) - data - end - - # Create a new incident team. - # - # Creates a new incident team. - # - # @deprecated This API is deprecated. - # - # @param body [IncidentTeamCreateRequest] Incident Team Payload. - # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTeamResponse, Integer, Hash)>] IncidentTeamResponse data, response status code and response headers - def create_incident_team_with_http_info(body, opts = {}) - warn "[DEPRECATION] `CreateIncidentTeam` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_team".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_team") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_team")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.create_incident_team ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling IncidentTeamsAPI.create_incident_team" - end - # resource path - local_var_path = '/api/v2/teams' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'IncidentTeamResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_incident_team, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#create_incident_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete an existing incident team. - # - # @see #delete_incident_team_with_http_info - def delete_incident_team(team_id, opts = {}) - delete_incident_team_with_http_info(team_id, opts) - nil - end - - # Delete an existing incident team. - # - # Deletes an existing incident team. - # - # @deprecated This API is deprecated. - # - # @param team_id [String] The ID of the incident team. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_team_with_http_info(team_id, opts = {}) - warn "[DEPRECATION] `DeleteIncidentTeam` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_team".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_team") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_team")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.delete_incident_team ...' - end - # verify the required parameter 'team_id' is set - if @api_client.config.client_side_validation && team_id.nil? - fail ArgumentError, "Missing the required parameter 'team_id' when calling IncidentTeamsAPI.delete_incident_team" - end - # resource path - local_var_path = '/api/v2/teams/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_incident_team, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#delete_incident_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get details of an incident team. - # - # @see #get_incident_team_with_http_info - def get_incident_team(team_id, opts = {}) - data, _status_code, _headers = get_incident_team_with_http_info(team_id, opts) - data - end - - # Get details of an incident team. - # - # Get details of an incident team. If the `include[users]` query parameter is provided, - # the included attribute will contain the users related to these incident teams. - # - # @deprecated This API is deprecated. - # - # @param team_id [String] The ID of the incident team. - # @param opts [Hash] the optional parameters - # @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response. - # @return [Array<(IncidentTeamResponse, Integer, Hash)>] IncidentTeamResponse data, response status code and response headers - def get_incident_team_with_http_info(team_id, opts = {}) - warn "[DEPRECATION] `GetIncidentTeam` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_team".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_team") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_team")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.get_incident_team ...' - end - # verify the required parameter 'team_id' is set - if @api_client.config.client_side_validation && team_id.nil? - fail ArgumentError, "Missing the required parameter 'team_id' when calling IncidentTeamsAPI.get_incident_team" - end - allowable_values = ['users', 'attachments'] - if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) - fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" - end - # resource path - local_var_path = '/api/v2/teams/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'IncidentTeamResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_incident_team, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#get_incident_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a list of all incident teams. - # - # @see #list_incident_teams_with_http_info - def list_incident_teams(opts = {}) - data, _status_code, _headers = list_incident_teams_with_http_info(opts) - data - end - - # Get a list of all incident teams. - # - # Get all incident teams for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident teams. - # - # @deprecated This API is deprecated. - # - # @param opts [Hash] the optional parameters - # @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response. - # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. - # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page. - # @option opts [String] :filter A search query that filters teams by name. - # @return [Array<(IncidentTeamsResponse, Integer, Hash)>] IncidentTeamsResponse data, response status code and response headers - def list_incident_teams_with_http_info(opts = {}) - warn "[DEPRECATION] `ListIncidentTeams` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_teams".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_teams") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_teams")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.list_incident_teams ...' - end - allowable_values = ['users', 'attachments'] - if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) - fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" - end - # resource path - local_var_path = '/api/v2/teams' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? - query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'IncidentTeamsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_incident_teams, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#list_incident_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update an existing incident team. - # - # @see #update_incident_team_with_http_info - def update_incident_team(team_id, body, opts = {}) - data, _status_code, _headers = update_incident_team_with_http_info(team_id, body, opts) - data - end - - # Update an existing incident team. - # - # Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. - # - # @deprecated This API is deprecated. - # - # @param team_id [String] The ID of the incident team. - # @param body [IncidentTeamUpdateRequest] Incident Team Payload. - # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTeamResponse, Integer, Hash)>] IncidentTeamResponse data, response status code and response headers - def update_incident_team_with_http_info(team_id, body, opts = {}) - warn "[DEPRECATION] `UpdateIncidentTeam` is deprecated." - unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_team".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_team") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_team")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentTeamsAPI.update_incident_team ...' - end - # verify the required parameter 'team_id' is set - if @api_client.config.client_side_validation && team_id.nil? - fail ArgumentError, "Missing the required parameter 'team_id' when calling IncidentTeamsAPI.update_incident_team" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling IncidentTeamsAPI.update_incident_team" - end - # resource path - local_var_path = '/api/v2/teams/{team_id}'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'IncidentTeamResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_incident_team, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentTeamsAPI#update_incident_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb b/lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb index 6519659223c2..1e380e518960 100644 --- a/lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb +++ b/lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ApmDependencyStatsQuery include BaseGenericModel + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source for APM dependency statistics queries. attr_reader :data_source @@ -57,6 +60,7 @@ class ApmDependencyStatsQuery # @!visibility private def self.attribute_map { + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'env' => :'env', :'is_upstream' => :'is_upstream', @@ -74,6 +78,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_org_uuids' => :'Array', :'data_source' => :'ApmDependencyStatsDataSource', :'env' => :'String', :'is_upstream' => :'Boolean', @@ -105,6 +110,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -150,6 +161,7 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @env.nil? return false if @name.nil? @@ -160,6 +172,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -256,6 +278,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && env == o.env && is_upstream == o.is_upstream && @@ -273,7 +296,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data_source, env, is_upstream, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash + [cross_org_uuids, data_source, env, is_upstream, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/apm_metrics_query.rb b/lib/datadog_api_client/v2/models/apm_metrics_query.rb index f99003b000ae..ae199d64b5fb 100644 --- a/lib/datadog_api_client/v2/models/apm_metrics_query.rb +++ b/lib/datadog_api_client/v2/models/apm_metrics_query.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ApmMetricsQuery include BaseGenericModel + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source for APM metrics queries. attr_reader :data_source @@ -63,6 +66,7 @@ class ApmMetricsQuery # @!visibility private def self.attribute_map { + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'group_by' => :'group_by', :'name' => :'name', @@ -82,6 +86,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_org_uuids' => :'Array', :'data_source' => :'ApmMetricsDataSource', :'group_by' => :'Array', :'name' => :'String', @@ -115,6 +120,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -172,12 +183,23 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @name.nil? return false if @stat.nil? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -234,6 +256,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && group_by == o.group_by && name == o.name && @@ -253,7 +276,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data_source, group_by, name, operation_mode, operation_name, peer_tags, query_filter, resource_hash, resource_name, service, span_kind, stat, additional_properties].hash + [cross_org_uuids, data_source, group_by, name, operation_mode, operation_name, peer_tags, query_filter, resource_hash, resource_name, service, span_kind, stat, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/apm_resource_stats_query.rb b/lib/datadog_api_client/v2/models/apm_resource_stats_query.rb index 5517bdf64bbc..258337933186 100644 --- a/lib/datadog_api_client/v2/models/apm_resource_stats_query.rb +++ b/lib/datadog_api_client/v2/models/apm_resource_stats_query.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ApmResourceStatsQuery include BaseGenericModel + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source for APM resource statistics queries. attr_reader :data_source @@ -57,6 +60,7 @@ class ApmResourceStatsQuery # @!visibility private def self.attribute_map { + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'env' => :'env', :'group_by' => :'group_by', @@ -74,6 +78,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_org_uuids' => :'Array', :'data_source' => :'ApmResourceStatsDataSource', :'env' => :'String', :'group_by' => :'Array', @@ -105,6 +110,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -152,6 +163,7 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @env.nil? return false if @name.nil? @@ -160,6 +172,16 @@ def valid? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -236,6 +258,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && env == o.env && group_by == o.group_by && @@ -253,7 +276,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data_source, env, group_by, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash + [cross_org_uuids, data_source, env, group_by, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/container_scalar_query.rb b/lib/datadog_api_client/v2/models/container_scalar_query.rb index ed2ae98d558c..a1191ab9d7e7 100644 --- a/lib/datadog_api_client/v2/models/container_scalar_query.rb +++ b/lib/datadog_api_client/v2/models/container_scalar_query.rb @@ -24,6 +24,9 @@ class ContainerScalarQuery # The type of aggregation that can be performed on metrics-based queries. attr_accessor :aggregator + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source for container-level infrastructure metrics. attr_reader :data_source @@ -55,6 +58,7 @@ class ContainerScalarQuery def self.attribute_map { :'aggregator' => :'aggregator', + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'is_normalized_cpu' => :'is_normalized_cpu', :'limit' => :'limit', @@ -71,6 +75,7 @@ def self.attribute_map def self.openapi_types { :'aggregator' => :'MetricsAggregator', + :'cross_org_uuids' => :'Array', :'data_source' => :'ContainerDataSource', :'is_normalized_cpu' => :'Boolean', :'limit' => :'Integer', @@ -104,6 +109,12 @@ def initialize(attributes = {}) self.aggregator = attributes[:'aggregator'] end + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -143,12 +154,23 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @metric.nil? return false if @name.nil? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -206,6 +228,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && aggregator == o.aggregator && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && is_normalized_cpu == o.is_normalized_cpu && limit == o.limit && @@ -221,7 +244,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [aggregator, data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash + [aggregator, cross_org_uuids, data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/container_timeseries_query.rb b/lib/datadog_api_client/v2/models/container_timeseries_query.rb index 6444c0b1784a..4a946f4ddf93 100644 --- a/lib/datadog_api_client/v2/models/container_timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/container_timeseries_query.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ContainerTimeseriesQuery include BaseGenericModel + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source for container-level infrastructure metrics. attr_reader :data_source @@ -51,6 +54,7 @@ class ContainerTimeseriesQuery # @!visibility private def self.attribute_map { + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'is_normalized_cpu' => :'is_normalized_cpu', :'limit' => :'limit', @@ -66,6 +70,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_org_uuids' => :'Array', :'data_source' => :'ContainerDataSource', :'is_normalized_cpu' => :'Boolean', :'limit' => :'Integer', @@ -95,6 +100,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -134,12 +145,23 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @metric.nil? return false if @name.nil? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -196,6 +218,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && is_normalized_cpu == o.is_normalized_cpu && limit == o.limit && @@ -211,7 +234,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash + [cross_org_uuids, data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/events_scalar_query.rb b/lib/datadog_api_client/v2/models/events_scalar_query.rb index 36d8803a514f..6d97f2a0a0d8 100644 --- a/lib/datadog_api_client/v2/models/events_scalar_query.rb +++ b/lib/datadog_api_client/v2/models/events_scalar_query.rb @@ -24,6 +24,9 @@ class EventsScalarQuery # The instructions for what to compute for this query. attr_reader :compute + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source that is powered by the Events Platform. attr_reader :data_source @@ -46,6 +49,7 @@ class EventsScalarQuery def self.attribute_map { :'compute' => :'compute', + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'group_by' => :'group_by', :'indexes' => :'indexes', @@ -59,6 +63,7 @@ def self.attribute_map def self.openapi_types { :'compute' => :'EventsCompute', + :'cross_org_uuids' => :'Array', :'data_source' => :'EventsDataSource', :'group_by' => :'Array', :'indexes' => :'Array', @@ -89,6 +94,12 @@ def initialize(attributes = {}) self.compute = attributes[:'compute'] end + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -119,6 +130,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @compute.nil? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? true end @@ -133,6 +145,16 @@ def compute=(compute) @compute = compute end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -170,6 +192,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && compute == o.compute && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && group_by == o.group_by && indexes == o.indexes && @@ -182,7 +205,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [compute, data_source, group_by, indexes, name, search, additional_properties].hash + [compute, cross_org_uuids, data_source, group_by, indexes, name, search, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/events_timeseries_query.rb b/lib/datadog_api_client/v2/models/events_timeseries_query.rb index bf283120794d..803b045c14ad 100644 --- a/lib/datadog_api_client/v2/models/events_timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/events_timeseries_query.rb @@ -24,6 +24,9 @@ class EventsTimeseriesQuery # The instructions for what to compute for this query. attr_reader :compute + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source that is powered by the Events Platform. attr_reader :data_source @@ -46,6 +49,7 @@ class EventsTimeseriesQuery def self.attribute_map { :'compute' => :'compute', + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'group_by' => :'group_by', :'indexes' => :'indexes', @@ -59,6 +63,7 @@ def self.attribute_map def self.openapi_types { :'compute' => :'EventsCompute', + :'cross_org_uuids' => :'Array', :'data_source' => :'EventsDataSource', :'group_by' => :'Array', :'indexes' => :'Array', @@ -89,6 +94,12 @@ def initialize(attributes = {}) self.compute = attributes[:'compute'] end + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -119,6 +130,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @compute.nil? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? true end @@ -133,6 +145,16 @@ def compute=(compute) @compute = compute end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -170,6 +192,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && compute == o.compute && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && group_by == o.group_by && indexes == o.indexes && @@ -182,7 +205,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [compute, data_source, group_by, indexes, name, search, additional_properties].hash + [compute, cross_org_uuids, data_source, group_by, indexes, name, search, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb deleted file mode 100644 index 3fc111a3a89d..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_create_attributes.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The incident team's attributes for a create request. - class IncidentTeamCreateAttributes - include BaseGenericModel - - # Name of the incident team. - attr_reader :name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamCreateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @name.nil? - true - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_included_items.rb b/lib/datadog_api_client/v2/models/incident_team_included_items.rb deleted file mode 100644 index 8f1292fd5633..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_included_items.rb +++ /dev/null @@ -1,62 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # An object related to an incident team which is present in the included payload. - module IncidentTeamIncludedItems - class << self - include BaseOneOfModel - include BaseOneOfModelNoDiscriminator - - # List of class defined in oneOf (OpenAPI v3) - def openapi_one_of - [ - :'User' - ] - end - # Builds the object - # @param data [Mixed] Data to be matched against the list of oneOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of oneOf items and attempt to identify the appropriate one. - # Note: - # - We do not attempt to check whether exactly one item matches. - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_one_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - typed_data = find_and_cast_into_type(klass, data) - next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed - return typed_data if typed_data - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - if openapi_one_of.include?(:AnyType) - data - else - self._unparsed = true - DatadogAPIClient::UnparsedObject.new(data) - end - end - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_relationships.rb b/lib/datadog_api_client/v2/models/incident_team_relationships.rb deleted file mode 100644 index 427886bbc0e8..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_relationships.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The incident team's relationships. - class IncidentTeamRelationships - include BaseGenericModel - - # Relationship to user. - attr_accessor :created_by - - # Relationship to user. - attr_accessor :last_modified_by - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_by' => :'created_by', - :'last_modified_by' => :'last_modified_by' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_by' => :'RelationshipToUser', - :'last_modified_by' => :'RelationshipToUser' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamRelationships` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - - if attributes.key?(:'last_modified_by') - self.last_modified_by = attributes[:'last_modified_by'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_by == o.created_by && - last_modified_by == o.last_modified_by && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_by, last_modified_by, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb deleted file mode 100644 index 61e5ba8b3c13..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_response_attributes.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The incident team's attributes from a response. - class IncidentTeamResponseAttributes - include BaseGenericModel - - # Timestamp of when the incident team was created. - attr_accessor :created - - # Timestamp of when the incident team was modified. - attr_accessor :modified - - # Name of the incident team. - attr_accessor :name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created' => :'created', - :'modified' => :'modified', - :'name' => :'name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created' => :'Time', - :'modified' => :'Time', - :'name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponseAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created') - self.created = attributes[:'created'] - end - - if attributes.key?(:'modified') - self.modified = attributes[:'modified'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created == o.created && - modified == o.modified && - name == o.name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created, modified, name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_response_data.rb b/lib/datadog_api_client/v2/models/incident_team_response_data.rb deleted file mode 100644 index 51b918569c82..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_response_data.rb +++ /dev/null @@ -1,135 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Incident Team data from a response. - class IncidentTeamResponseData - include BaseGenericModel - - # The incident team's attributes from a response. - attr_accessor :attributes - - # The incident team's ID. - attr_accessor :id - - # The incident team's relationships. - attr_accessor :relationships - - # Incident Team resource type. - attr_accessor :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'IncidentTeamResponseAttributes', - :'id' => :'String', - :'relationships' => :'IncidentTeamRelationships', - :'type' => :'IncidentTeamType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamResponseData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb b/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb deleted file mode 100644 index e174ec43996a..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_update_attributes.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The incident team's attributes for an update request. - class IncidentTeamUpdateAttributes - include BaseGenericModel - - # Name of the incident team. - attr_reader :name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @name.nil? - true - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/incident_team_update_request.rb b/lib/datadog_api_client/v2/models/incident_team_update_request.rb deleted file mode 100644 index e91949273b54..000000000000 --- a/lib/datadog_api_client/v2/models/incident_team_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Update request with an incident team payload. - class IncidentTeamUpdateRequest - include BaseGenericModel - - # Incident Team data for an update request. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'IncidentTeamUpdateData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTeamUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/issues_search_request_data_attributes.rb b/lib/datadog_api_client/v2/models/issues_search_request_data_attributes.rb index 5c05851eab51..ba0fc098297e 100644 --- a/lib/datadog_api_client/v2/models/issues_search_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/issues_search_request_data_attributes.rb @@ -36,6 +36,9 @@ class IssuesSearchRequestDataAttributes # Search query following the event search syntax. attr_reader :query + # Filter issues by state. Multiple values are combined with OR logic. + attr_reader :states + # Filter issues by team IDs. Multiple values are combined with OR logic. attr_reader :team_ids @@ -56,6 +59,7 @@ def self.attribute_map :'order_by' => :'order_by', :'persona' => :'persona', :'query' => :'query', + :'states' => :'states', :'team_ids' => :'team_ids', :'to' => :'to', :'track' => :'track' @@ -71,6 +75,7 @@ def self.openapi_types :'order_by' => :'IssuesSearchRequestDataAttributesOrderBy', :'persona' => :'IssuesSearchRequestDataAttributesPersona', :'query' => :'String', + :'states' => :'Array', :'team_ids' => :'Array', :'to' => :'Integer', :'track' => :'IssuesSearchRequestDataAttributesTrack' @@ -117,6 +122,12 @@ def initialize(attributes = {}) self.query = attributes[:'query'] end + if attributes.key?(:'states') + if (value = attributes[:'states']).is_a?(Array) + self.states = value + end + end + if attributes.key?(:'team_ids') if (value = attributes[:'team_ids']).is_a?(Array) self.team_ids = value @@ -139,6 +150,7 @@ def valid? return false if !@assignee_ids.nil? && @assignee_ids.length > 50 return false if @from.nil? return false if @query.nil? + return false if !@states.nil? && @states.length > 20 return false if !@team_ids.nil? && @team_ids.length > 50 return false if @to.nil? true @@ -174,6 +186,16 @@ def query=(query) @query = query end + # Custom attribute writer method with validation + # @param states [Object] Object to be assigned + # @!visibility private + def states=(states) + if !states.nil? && states.length > 20 + fail ArgumentError, 'invalid value for "states", number of items must be less than or equal to 20.' + end + @states = states + end + # Custom attribute writer method with validation # @param team_ids [Object] Object to be assigned # @!visibility private @@ -225,6 +247,7 @@ def ==(o) order_by == o.order_by && persona == o.persona && query == o.query && + states == o.states && team_ids == o.team_ids && to == o.to && track == o.track && @@ -235,7 +258,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [assignee_ids, from, order_by, persona, query, team_ids, to, track, additional_properties].hash + [assignee_ids, from, order_by, persona, query, states, team_ids, to, track, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/metrics_scalar_query.rb b/lib/datadog_api_client/v2/models/metrics_scalar_query.rb index e6fed22431fc..9a974fad3205 100644 --- a/lib/datadog_api_client/v2/models/metrics_scalar_query.rb +++ b/lib/datadog_api_client/v2/models/metrics_scalar_query.rb @@ -24,6 +24,9 @@ class MetricsScalarQuery # The type of aggregation that can be performed on metrics-based queries. attr_reader :aggregator + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source that is powered by the Metrics platform. attr_reader :data_source @@ -40,6 +43,7 @@ class MetricsScalarQuery def self.attribute_map { :'aggregator' => :'aggregator', + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'name' => :'name', :'query' => :'query' @@ -51,6 +55,7 @@ def self.attribute_map def self.openapi_types { :'aggregator' => :'MetricsAggregator', + :'cross_org_uuids' => :'Array', :'data_source' => :'MetricsDataSource', :'name' => :'String', :'query' => :'String' @@ -79,6 +84,12 @@ def initialize(attributes = {}) self.aggregator = attributes[:'aggregator'] end + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -97,6 +108,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @aggregator.nil? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @query.nil? true @@ -112,6 +124,16 @@ def aggregator=(aggregator) @aggregator = aggregator end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -159,6 +181,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && aggregator == o.aggregator && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && name == o.name && query == o.query && @@ -169,7 +192,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [aggregator, data_source, name, query, additional_properties].hash + [aggregator, cross_org_uuids, data_source, name, query, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb b/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb index 1602e7e772b4..11f7a8cf1ff8 100644 --- a/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class MetricsTimeseriesQuery include BaseGenericModel + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source that is powered by the Metrics platform. attr_reader :data_source @@ -36,6 +39,7 @@ class MetricsTimeseriesQuery # @!visibility private def self.attribute_map { + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'name' => :'name', :'query' => :'query' @@ -46,6 +50,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_org_uuids' => :'Array', :'data_source' => :'MetricsDataSource', :'name' => :'String', :'query' => :'String' @@ -70,6 +75,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -87,11 +98,22 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @query.nil? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -138,6 +160,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && name == o.name && query == o.query && @@ -148,7 +171,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data_source, name, query, additional_properties].hash + [cross_org_uuids, data_source, name, query, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/process_scalar_query.rb b/lib/datadog_api_client/v2/models/process_scalar_query.rb index bc81394a00cf..dc77c14e6e93 100644 --- a/lib/datadog_api_client/v2/models/process_scalar_query.rb +++ b/lib/datadog_api_client/v2/models/process_scalar_query.rb @@ -24,6 +24,9 @@ class ProcessScalarQuery # The type of aggregation that can be performed on metrics-based queries. attr_accessor :aggregator + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source for process-level infrastructure metrics. attr_reader :data_source @@ -55,6 +58,7 @@ class ProcessScalarQuery def self.attribute_map { :'aggregator' => :'aggregator', + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'is_normalized_cpu' => :'is_normalized_cpu', :'limit' => :'limit', @@ -71,6 +75,7 @@ def self.attribute_map def self.openapi_types { :'aggregator' => :'MetricsAggregator', + :'cross_org_uuids' => :'Array', :'data_source' => :'ProcessDataSource', :'is_normalized_cpu' => :'Boolean', :'limit' => :'Integer', @@ -104,6 +109,12 @@ def initialize(attributes = {}) self.aggregator = attributes[:'aggregator'] end + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -143,12 +154,23 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @metric.nil? return false if @name.nil? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -206,6 +228,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && aggregator == o.aggregator && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && is_normalized_cpu == o.is_normalized_cpu && limit == o.limit && @@ -221,7 +244,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [aggregator, data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash + [aggregator, cross_org_uuids, data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/process_timeseries_query.rb b/lib/datadog_api_client/v2/models/process_timeseries_query.rb index cf08ea931e22..e35acd337913 100644 --- a/lib/datadog_api_client/v2/models/process_timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/process_timeseries_query.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class ProcessTimeseriesQuery include BaseGenericModel + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source for process-level infrastructure metrics. attr_reader :data_source @@ -51,6 +54,7 @@ class ProcessTimeseriesQuery # @!visibility private def self.attribute_map { + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'is_normalized_cpu' => :'is_normalized_cpu', :'limit' => :'limit', @@ -66,6 +70,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'cross_org_uuids' => :'Array', :'data_source' => :'ProcessDataSource', :'is_normalized_cpu' => :'Boolean', :'limit' => :'Integer', @@ -95,6 +100,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -134,12 +145,23 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @metric.nil? return false if @name.nil? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -196,6 +218,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && is_normalized_cpu == o.is_normalized_cpu && limit == o.limit && @@ -211,7 +234,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash + [cross_org_uuids, data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/slo_query.rb b/lib/datadog_api_client/v2/models/slo_query.rb index 0cc376bd6ce6..406ecad0e41b 100644 --- a/lib/datadog_api_client/v2/models/slo_query.rb +++ b/lib/datadog_api_client/v2/models/slo_query.rb @@ -24,6 +24,9 @@ class SloQuery # Additional filters applied to the SLO query. attr_accessor :additional_query_filters + # Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID. + attr_reader :cross_org_uuids + # A data source for SLO queries. attr_reader :data_source @@ -49,6 +52,7 @@ class SloQuery def self.attribute_map { :'additional_query_filters' => :'additional_query_filters', + :'cross_org_uuids' => :'cross_org_uuids', :'data_source' => :'data_source', :'group_mode' => :'group_mode', :'measure' => :'measure', @@ -63,6 +67,7 @@ def self.attribute_map def self.openapi_types { :'additional_query_filters' => :'String', + :'cross_org_uuids' => :'Array', :'data_source' => :'SloDataSource', :'group_mode' => :'SlosGroupMode', :'measure' => :'SlosMeasure', @@ -94,6 +99,12 @@ def initialize(attributes = {}) self.additional_query_filters = attributes[:'additional_query_filters'] end + if attributes.key?(:'cross_org_uuids') + if (value = attributes[:'cross_org_uuids']).is_a?(Array) + self.cross_org_uuids = value + end + end + if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end @@ -123,12 +134,23 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @measure.nil? return false if @slo_id.nil? true end + # Custom attribute writer method with validation + # @param cross_org_uuids [Object] Object to be assigned + # @!visibility private + def cross_org_uuids=(cross_org_uuids) + if !cross_org_uuids.nil? && cross_org_uuids.length > 1 + fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.' + end + @cross_org_uuids = cross_org_uuids + end + # Custom attribute writer method with validation # @param data_source [Object] Object to be assigned # @!visibility private @@ -186,6 +208,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && additional_query_filters == o.additional_query_filters && + cross_org_uuids == o.cross_org_uuids && data_source == o.data_source && group_mode == o.group_mode && measure == o.measure && @@ -199,7 +222,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [additional_query_filters, data_source, group_mode, measure, name, slo_id, slo_query_type, additional_properties].hash + [additional_query_filters, cross_org_uuids, data_source, group_mode, measure, name, slo_id, slo_query_type, additional_properties].hash end end end