From 60f0a3625943b1dbb17859eee61f4e163f070089 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 13 Jul 2026 23:02:26 +0000 Subject: [PATCH] Regenerate client from commit 511ff5d of spec repo --- .generator/schemas/v2/openapi.yaml | 505 ++++++++++++++- .../ListDatasetReportSchedules.java | 26 + examples/v2/report-schedules/PrintReport.java | 50 ++ .../api/client/v2/api/ReportSchedulesApi.java | 285 +++++++++ .../DatasetReportScheduleListResponse.java | 199 ++++++ .../DatasetReportScheduleResourceType.java | 58 ++ ...tasetReportScheduleResponseAttributes.java | 599 ++++++++++++++++++ .../DatasetReportScheduleResponseData.java | 245 +++++++ ...yPipelineTagCardinalityLimitProcessor.java | 35 + ...ardinalityLimitProcessorOverrideType.java} | 37 +- ...rdinalityLimitProcessorPerMetricLimit.java | 59 +- ...gCardinalityLimitProcessorPerTagLimit.java | 54 +- ...CardinalityLimitProcessorTrackingMode.java | 161 +++++ ...nalityLimitProcessorTrackingModeMode.java} | 42 +- .../client/v2/model/PrintReportRequest.java | 145 +++++ .../model/PrintReportRequestAttributes.java | 346 ++++++++++ .../v2/model/PrintReportRequestData.java | 183 ++++++ .../client/v2/model/PrintReportResponse.java | 145 +++++ .../model/PrintReportResponseAttributes.java | 370 +++++++++++ .../v2/model/PrintReportResponseData.java | 210 ++++++ .../api/client/v2/model/PrintReportType.java | 53 ++ .../client/v2/api/report_schedules.feature | 49 ++ .../com/datadog/api/client/v2/api/undo.json | 12 + 23 files changed, 3752 insertions(+), 116 deletions(-) create mode 100644 examples/v2/report-schedules/ListDatasetReportSchedules.java create mode 100644 examples/v2/report-schedules/PrintReport.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleListResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResourceType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResponseAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResponseData.java rename src/main/java/com/datadog/api/client/v2/model/{ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode.java => ObservabilityPipelineTagCardinalityLimitProcessorOverrideType.java} (58%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode.java rename src/main/java/com/datadog/api/client/v2/model/{ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode.java => ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode.java} (56%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/PrintReportRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/PrintReportRequestAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/PrintReportRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/PrintReportResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/PrintReportResponseAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/PrintReportResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/PrintReportType.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 49e923cae4c..a67c3bf1fdb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -30514,6 +30514,146 @@ components: required: - data type: object + DatasetReportScheduleListResponse: + description: Response containing a list of report schedules for a published dataset. + properties: + data: + description: A list of report schedules for the dataset. + items: + $ref: "#/components/schemas/DatasetReportScheduleResponseData" + type: array + included: + description: Related resources included with the report schedules, such as authors. + items: + $ref: "#/components/schemas/ReportScheduleIncludedResource" + type: array + required: + - data + type: object + DatasetReportScheduleResourceType: + description: The type of resource targeted by a dataset report schedule. + enum: + - widget_dataset_list + example: widget_dataset_list + type: string + x-enum-varnames: + - WIDGET_DATASET_LIST + DatasetReportScheduleResponseAttributes: + description: The configuration and derived state of a report schedule for a published dataset. + properties: + cell_id: + description: The identifier of the notebook cell that published the dataset, or `null` if not set. + example: "sevhjcis" + nullable: true + type: string + dataset_id: + description: The identifier of the dataset, or `null` if not set. + example: "MW5vdGVib29rX2NlbGw6ZDI0ZTM2MWMtZDFlNC00NDYwLWIyOWUtNTg3YTczMzA3MDFm" + nullable: true + type: string + description: + description: The description of the report. + example: "This is a scheduled notebook dataset report." + type: string + file_row_limit: + description: The maximum number of rows included in the attached CSV file, or `null` if not set. + example: 5000 + format: int64 + nullable: true + type: integer + inline_row_limit: + description: The maximum number of rows included inline in the email body, or `null` if not set. + example: 10 + format: int64 + nullable: true + type: integer + next_recurrence: + description: |- + The Unix timestamp, in milliseconds, of the next scheduled delivery, or + `null` if none is scheduled. + example: 1725859200000 + format: int64 + nullable: true + type: integer + notebook_id: + description: The identifier of the notebook containing the dataset cell, or `null` if not set. + example: 1 + format: int64 + nullable: true + type: integer + recipients: + description: |- + The recipients of the report (email addresses, Slack channel references, or + Microsoft Teams channel references). + example: + - "test@datadoghq.com" + items: + description: |- + A single recipient (email address, Slack channel reference, or Microsoft + Teams channel reference). + type: string + type: array + resource_id: + description: The identifier of the widget containing the dataset. + example: "aaaabbbb-1111-2222-3333-444455556666" + type: string + resource_type: + $ref: "#/components/schemas/DatasetReportScheduleResourceType" + rrule: + description: The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string. + example: "DTSTART;TZID=America/New_York:20240912T090000\nRRULE:FREQ=DAILY;BYHOUR=9;BYMINUTE=0" + type: string + status: + $ref: "#/components/schemas/ReportScheduleStatus" + timeframe: + description: The relative timeframe of data included in the report. + example: "calendar_day" + type: string + timezone: + description: The IANA time zone identifier the recurrence rule is evaluated in. + example: "America/New_York" + type: string + title: + description: The title of the report. + example: "My Cool Dataset Report" + type: string + required: + - status + - resource_id + - resource_type + - recipients + - rrule + - timezone + - title + - description + - timeframe + - file_row_limit + - inline_row_limit + - next_recurrence + - notebook_id + - cell_id + - dataset_id + type: object + DatasetReportScheduleResponseData: + description: The JSON:API data object representing a dataset report schedule. + properties: + attributes: + $ref: "#/components/schemas/DatasetReportScheduleResponseAttributes" + id: + description: The unique identifier of the dataset report schedule. + example: "e1234567-1234-1234-1234-123456789012" + format: uuid + type: string + relationships: + $ref: "#/components/schemas/ReportScheduleResponseRelationships" + type: + $ref: "#/components/schemas/ReportScheduleType" + required: + - id + - type + - attributes + - relationships + type: object DatasetRequest: description: |- **Datasets Object Constraints** @@ -70492,6 +70632,8 @@ components: $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit" maxItems: 100 type: array + tracking_mode: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode" type: $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorType" value_limit: @@ -70506,6 +70648,7 @@ components: - type - include - limit_exceeded_action + - tracking_mode - value_limit - enabled type: object @@ -70520,6 +70663,16 @@ components: x-enum-varnames: - DROP_TAG - DROP_EVENT + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType: + description: How the override is applied. `limit_override` enforces a custom limit; `excluded` omits the metric or tag from cardinality tracking. + enum: + - limit_override + - excluded + example: limit_override + type: string + x-enum-varnames: + - LIMIT_OVERRIDE + - EXCLUDED ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit: description: A cardinality override applied to a specific metric. properties: @@ -70529,16 +70682,16 @@ components: description: The name of the metric this override applies to. example: "system.cpu.user" type: string - mode: - $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode" + override_type: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType" per_tag_limits: - description: A list of per-tag cardinality overrides that apply within this metric. Must be omitted when `mode` is `excluded`. + description: A list of per-tag cardinality overrides that apply within this metric. Must be omitted when `override_type` is `excluded`. items: $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit" maxItems: 50 type: array value_limit: - description: The maximum number of distinct tag value combinations allowed for this metric. Required when `mode` is `tracked`. Must be omitted when `mode` is `excluded`. + description: The maximum number of distinct tag value combinations allowed for this metric. Required when `override_type` is `limit_override`. Must be omitted when `override_type` is `excluded`. example: 10000 format: int64 maximum: 1000000 @@ -70546,29 +70699,19 @@ components: type: integer required: - metric_name - - mode + - override_type type: object - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode: - description: How the per-metric override is applied. `tracked` enforces a custom limit; `excluded` skips the metric entirely. - enum: - - tracked - - excluded - example: tracked - type: string - x-enum-varnames: - - TRACKED - - EXCLUDED ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit: description: A cardinality override for a specific tag key within a per-metric limit. properties: - mode: - $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode" + override_type: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType" tag_key: description: The tag key this override applies to. example: "host" type: string value_limit: - description: The maximum number of distinct values allowed for this tag. Required when `mode` is `limit_override`. Must be omitted when `mode` is `excluded`. + description: The maximum number of distinct values allowed for this tag. Required when `override_type` is `limit_override`. Must be omitted when `override_type` is `excluded`. example: 5000 format: int64 maximum: 1000000 @@ -70576,18 +70719,26 @@ components: type: integer required: - tag_key + - override_type + type: object + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode: + description: Controls whether the processor uses exact or probabilistic tag tracking. + properties: + mode: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode" + required: - mode type: object - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode: - description: How the per-tag override is applied. `limit_override` enforces a custom limit on the tag; `excluded` skips the tag from cardinality tracking. + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode: + description: The cardinality tracking algorithm to use. enum: - - limit_override - - excluded - example: limit_override + - exact_fingerprint + - probabilistic + example: exact_fingerprint type: string x-enum-varnames: - - LIMIT_OVERRIDE - - EXCLUDED + - EXACT_FINGERPRINT + - PROBABILISTIC ObservabilityPipelineTagCardinalityLimitProcessorType: default: tag_cardinality_limit description: The processor type. The value must be `tag_cardinality_limit`. @@ -75913,6 +76064,149 @@ components: required: - type type: object + PrintReportRequest: + description: Request body for initiating a print-only report. + properties: + data: + $ref: "#/components/schemas/PrintReportRequestData" + required: + - data + type: object + PrintReportRequestAttributes: + description: |- + The configuration for a print-only report. Specify exactly one of `timeframe` (for a + relative time window) or both `from_ts` and `to_ts` (for an absolute time range). + properties: + from_ts: + description: |- + The start of an absolute time range, as a Unix timestamp in milliseconds. + Required when `timeframe` is omitted. + example: 1780318800000 + format: int64 + type: integer + resource_id: + description: The identifier of the dashboard or integration dashboard to render. + example: "abc-def-ghi" + type: string + resource_type: + $ref: "#/components/schemas/ReportScheduleResourceType" + template_variables: + description: The dashboard template variables applied when rendering the report. + items: + $ref: "#/components/schemas/ReportScheduleTemplateVariable" + type: array + timeframe: + description: |- + A relative time window (for example `1w` or `calendar_month`). Mutually + exclusive with `from_ts` and `to_ts`. + example: "1w" + type: string + timezone: + description: The IANA time zone identifier used to evaluate the time window. + example: "America/New_York" + type: string + to_ts: + description: |- + The end of an absolute time range, as a Unix timestamp in milliseconds. + Required when `timeframe` is omitted. + example: 1780923600000 + format: int64 + type: integer + required: + - resource_id + - resource_type + - timezone + - template_variables + type: object + PrintReportRequestData: + description: The JSON:API data object for a print report request. + properties: + attributes: + $ref: "#/components/schemas/PrintReportRequestAttributes" + type: + $ref: "#/components/schemas/PrintReportType" + required: + - type + - attributes + type: object + PrintReportResponse: + description: Response containing the initiated print-only report. + properties: + data: + $ref: "#/components/schemas/PrintReportResponseData" + required: + - data + type: object + PrintReportResponseAttributes: + description: The configuration and download URL for the initiated print-only report. + properties: + download_url: + description: The URL from which the rendered PDF report can be downloaded. + example: "https://app.datadoghq.com/..." + type: string + from_ts: + description: The start of the rendered time range, as a Unix timestamp in milliseconds. + example: 1780318800000 + format: int64 + type: integer + resource_id: + description: The identifier of the dashboard or integration dashboard. + example: "abc-def-ghi" + type: string + resource_type: + $ref: "#/components/schemas/ReportScheduleResourceType" + template_variables: + description: The dashboard template variables applied when rendering the report. + items: + $ref: "#/components/schemas/ReportScheduleTemplateVariable" + type: array + timeframe: + description: The relative time window used, if one was specified in the request. + example: "1w" + type: string + timezone: + description: The IANA time zone identifier used when rendering the report. + example: "America/New_York" + type: string + to_ts: + description: The end of the rendered time range, as a Unix timestamp in milliseconds. + example: 1780923600000 + format: int64 + type: integer + required: + - resource_id + - resource_type + - timezone + - template_variables + - from_ts + - to_ts + - download_url + type: object + PrintReportResponseData: + description: The JSON:API data object for a print-only report. + properties: + attributes: + $ref: "#/components/schemas/PrintReportResponseAttributes" + id: + description: The unique identifier of the report. + example: "11111111-2222-3333-4444-555555555555" + format: uuid + type: string + type: + $ref: "#/components/schemas/PrintReportType" + required: + - id + - type + - attributes + type: object + PrintReportType: + description: JSON:API resource type for a print-only report. + enum: + - report + example: report + type: string + x-enum-varnames: + - REPORT ProcessDataSource: default: process description: A data source for process-level infrastructure metrics. @@ -168146,6 +168440,167 @@ paths: summary: Update replay heatmap snapshot tags: - Rum Replay Heatmaps + /api/v2/reporting/dataset/{dataset_id}/schedules: + get: + description: |- + Retrieve all report schedules for a given published dataset. + Returns report schedules belonging to the authenticated user's organization that target the specified dataset. + Requires the `generate_log_reports` or `manage_log_reports` permission. + operationId: ListDatasetReportSchedules + parameters: + - description: The identifier of the published dataset to retrieve report schedules for. + example: "MW5vdGVib29rX2NlbGw6ZDI0ZTM2MWMtZDFlNC00NDYwLWIyOWUtNTg3YTczMzA3MDFm" + in: path + name: dataset_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + cell_id: "sevhjcis" + dataset_id: "MW5vdGVib29rX2NlbGw6ZDI0ZTM2MWMtZDFlNC00NDYwLWIyOWUtNTg3YTczMzA3MDFm" + description: "This is a scheduled notebook dataset report." + file_row_limit: 5000 + inline_row_limit: 10 + next_recurrence: 1725859200000 + notebook_id: 1 + recipients: + - "test@datadoghq.com" + resource_id: "aaaabbbb-1111-2222-3333-444455556666" + resource_type: widget_dataset_list + rrule: "DTSTART;TZID=America/New_York:20240912T090000\nRRULE:FREQ=DAILY;BYHOUR=9;BYMINUTE=0" + status: active + timeframe: "calendar_day" + timezone: "America/New_York" + title: "My Cool Dataset Report" + id: "e1234567-1234-1234-1234-123456789012" + relationships: + author: + data: + id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: users + type: schedule + included: + - attributes: + email: "user@example.com" + name: "Example User" + id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: users + schema: + $ref: "#/components/schemas/DatasetReportScheduleListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List dataset report schedules + tags: + - Report Schedules + /api/v2/reporting/print: + post: + description: |- + Initiate a one-off, print-only report for a dashboard or integration dashboard. + The report is rendered as a PDF and made available for download through the URL returned in the response. + Requires a reporting permission appropriate to the targeted resource type. + operationId: PrintReport + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + resource_id: "abc-def-ghi" + resource_type: dashboard + template_variables: + - name: "env" + values: + - "prod" + timeframe: "1w" + timezone: "America/New_York" + type: report + schema: + $ref: "#/components/schemas/PrintReportRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + download_url: "https://app.datadoghq.com/..." + from_ts: 1780318800000 + resource_id: "abc-def-ghi" + resource_type: dashboard + template_variables: + - name: "env" + values: + - "prod" + timeframe: "1w" + timezone: "America/New_York" + to_ts: 1780923600000 + id: "11111111-2222-3333-4444-555555555555" + type: report + schema: + $ref: "#/components/schemas/PrintReportResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Print a report + tags: + - Report Schedules + x-codegen-request-body-name: body /api/v2/reporting/schedule: post: description: |- diff --git a/examples/v2/report-schedules/ListDatasetReportSchedules.java b/examples/v2/report-schedules/ListDatasetReportSchedules.java new file mode 100644 index 00000000000..a519d5211f3 --- /dev/null +++ b/examples/v2/report-schedules/ListDatasetReportSchedules.java @@ -0,0 +1,26 @@ +// List dataset report schedules returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ReportSchedulesApi; +import com.datadog.api.client.v2.model.DatasetReportScheduleListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + ReportSchedulesApi apiInstance = new ReportSchedulesApi(defaultClient); + + try { + DatasetReportScheduleListResponse result = + apiInstance.listDatasetReportSchedules( + "MW5vdGVib29rX2NlbGw6ZDI0ZTM2MWMtZDFlNC00NDYwLWIyOWUtNTg3YTczMzA3MDFm"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReportSchedulesApi#listDatasetReportSchedules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/report-schedules/PrintReport.java b/examples/v2/report-schedules/PrintReport.java new file mode 100644 index 00000000000..1f9d2543376 --- /dev/null +++ b/examples/v2/report-schedules/PrintReport.java @@ -0,0 +1,50 @@ +// Print a report returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ReportSchedulesApi; +import com.datadog.api.client.v2.model.PrintReportRequest; +import com.datadog.api.client.v2.model.PrintReportRequestAttributes; +import com.datadog.api.client.v2.model.PrintReportRequestData; +import com.datadog.api.client.v2.model.PrintReportResponse; +import com.datadog.api.client.v2.model.PrintReportType; +import com.datadog.api.client.v2.model.ReportScheduleResourceType; +import com.datadog.api.client.v2.model.ReportScheduleTemplateVariable; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + ReportSchedulesApi apiInstance = new ReportSchedulesApi(defaultClient); + + PrintReportRequest body = + new PrintReportRequest() + .data( + new PrintReportRequestData() + .attributes( + new PrintReportRequestAttributes() + .fromTs(1780318800000L) + .resourceId("abc-def-ghi") + .resourceType(ReportScheduleResourceType.DASHBOARD) + .templateVariables( + Collections.singletonList( + new ReportScheduleTemplateVariable() + .name("env") + .values(Collections.singletonList("prod")))) + .timeframe("1w") + .timezone("America/New_York") + .toTs(1780923600000L)) + .type(PrintReportType.REPORT)); + + try { + PrintReportResponse result = apiInstance.printReport(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReportSchedulesApi#printReport"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/ReportSchedulesApi.java b/src/main/java/com/datadog/api/client/v2/api/ReportSchedulesApi.java index 16ff30af5a4..4572639638d 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ReportSchedulesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ReportSchedulesApi.java @@ -4,6 +4,9 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.DatasetReportScheduleListResponse; +import com.datadog.api.client.v2.model.PrintReportRequest; +import com.datadog.api.client.v2.model.PrintReportResponse; import com.datadog.api.client.v2.model.ReportScheduleCreateRequest; import com.datadog.api.client.v2.model.ReportScheduleListResponse; import com.datadog.api.client.v2.model.ReportSchedulePatchRequest; @@ -655,6 +658,155 @@ public ApiResponse getReportSchedulesForResourceWith new GenericType() {}); } + /** + * List dataset report schedules. + * + *

See {@link #listDatasetReportSchedulesWithHttpInfo}. + * + * @param datasetId The identifier of the published dataset to retrieve report schedules for. + * (required) + * @return DatasetReportScheduleListResponse + * @throws ApiException if fails to make API call + */ + public DatasetReportScheduleListResponse listDatasetReportSchedules(String datasetId) + throws ApiException { + return listDatasetReportSchedulesWithHttpInfo(datasetId).getData(); + } + + /** + * List dataset report schedules. + * + *

See {@link #listDatasetReportSchedulesWithHttpInfoAsync}. + * + * @param datasetId The identifier of the published dataset to retrieve report schedules for. + * (required) + * @return CompletableFuture<DatasetReportScheduleListResponse> + */ + public CompletableFuture listDatasetReportSchedulesAsync( + String datasetId) { + return listDatasetReportSchedulesWithHttpInfoAsync(datasetId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve all report schedules for a given published dataset. Returns report schedules belonging + * to the authenticated user's organization that target the specified dataset. Requires the + * generate_log_reports or manage_log_reports permission. + * + * @param datasetId The identifier of the published dataset to retrieve report schedules for. + * (required) + * @return ApiResponse<DatasetReportScheduleListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listDatasetReportSchedulesWithHttpInfo( + String datasetId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling listDatasetReportSchedules"); + } + // create path and map variables + String localVarPath = + "/api/v2/reporting/dataset/{dataset_id}/schedules" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ReportSchedulesApi.listDatasetReportSchedules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List dataset report schedules. + * + *

See {@link #listDatasetReportSchedulesWithHttpInfo}. + * + * @param datasetId The identifier of the published dataset to retrieve report schedules for. + * (required) + * @return CompletableFuture<ApiResponse<DatasetReportScheduleListResponse>> + */ + public CompletableFuture> + listDatasetReportSchedulesWithHttpInfoAsync(String datasetId) { + Object localVarPostBody = null; + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling" + + " listDatasetReportSchedules")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/reporting/dataset/{dataset_id}/schedules" + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ReportSchedulesApi.listDatasetReportSchedules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** Manage optional parameters to listReportSchedules. */ public static class ListReportSchedulesOptionalParameters { private Long pageLimit; @@ -1077,6 +1229,139 @@ public ApiResponse patchReportScheduleWithHttpInfo( new GenericType() {}); } + /** + * Print a report. + * + *

See {@link #printReportWithHttpInfo}. + * + * @param body (required) + * @return PrintReportResponse + * @throws ApiException if fails to make API call + */ + public PrintReportResponse printReport(PrintReportRequest body) throws ApiException { + return printReportWithHttpInfo(body).getData(); + } + + /** + * Print a report. + * + *

See {@link #printReportWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<PrintReportResponse> + */ + public CompletableFuture printReportAsync(PrintReportRequest body) { + return printReportWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Initiate a one-off, print-only report for a dashboard or integration dashboard. The report is + * rendered as a PDF and made available for download through the URL returned in the response. + * Requires a reporting permission appropriate to the targeted resource type. + * + * @param body (required) + * @return ApiResponse<PrintReportResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
+ */ + public ApiResponse printReportWithHttpInfo(PrintReportRequest body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling printReport"); + } + // create path and map variables + String localVarPath = "/api/v2/reporting/print"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ReportSchedulesApi.printReport", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Print a report. + * + *

See {@link #printReportWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<PrintReportResponse>> + */ + public CompletableFuture> printReportWithHttpInfoAsync( + PrintReportRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'body' when calling printReport")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/reporting/print"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ReportSchedulesApi.printReport", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Toggle a report schedule. * diff --git a/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleListResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleListResponse.java new file mode 100644 index 00000000000..8dc18fb8665 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleListResponse.java @@ -0,0 +1,199 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a list of report schedules for a published dataset. */ +@JsonPropertyOrder({ + DatasetReportScheduleListResponse.JSON_PROPERTY_DATA, + DatasetReportScheduleListResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatasetReportScheduleListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public DatasetReportScheduleListResponse() {} + + @JsonCreator + public DatasetReportScheduleListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public DatasetReportScheduleListResponse data(List data) { + this.data = data; + for (DatasetReportScheduleResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DatasetReportScheduleListResponse addDataItem(DatasetReportScheduleResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * A list of report schedules for the dataset. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public DatasetReportScheduleListResponse included(List included) { + this.included = included; + for (ReportScheduleIncludedResource item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DatasetReportScheduleListResponse addIncludedItem( + ReportScheduleIncludedResource includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Related resources included with the report schedules, such as authors. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatasetReportScheduleListResponse + */ + @JsonAnySetter + public DatasetReportScheduleListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatasetReportScheduleListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetReportScheduleListResponse datasetReportScheduleListResponse = + (DatasetReportScheduleListResponse) o; + return Objects.equals(this.data, datasetReportScheduleListResponse.data) + && Objects.equals(this.included, datasetReportScheduleListResponse.included) + && Objects.equals( + this.additionalProperties, datasetReportScheduleListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetReportScheduleListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResourceType.java b/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResourceType.java new file mode 100644 index 00000000000..44fcdf165af --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResourceType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of resource targeted by a dataset report schedule. */ +@JsonSerialize( + using = DatasetReportScheduleResourceType.DatasetReportScheduleResourceTypeSerializer.class) +public class DatasetReportScheduleResourceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("widget_dataset_list")); + + public static final DatasetReportScheduleResourceType WIDGET_DATASET_LIST = + new DatasetReportScheduleResourceType("widget_dataset_list"); + + DatasetReportScheduleResourceType(String value) { + super(value, allowedValues); + } + + public static class DatasetReportScheduleResourceTypeSerializer + extends StdSerializer { + public DatasetReportScheduleResourceTypeSerializer(Class t) { + super(t); + } + + public DatasetReportScheduleResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DatasetReportScheduleResourceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DatasetReportScheduleResourceType fromValue(String value) { + return new DatasetReportScheduleResourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResponseAttributes.java new file mode 100644 index 00000000000..ded2623d707 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResponseAttributes.java @@ -0,0 +1,599 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The configuration and derived state of a report schedule for a published dataset. */ +@JsonPropertyOrder({ + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_CELL_ID, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_DATASET_ID, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_DESCRIPTION, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_FILE_ROW_LIMIT, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_INLINE_ROW_LIMIT, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_NEXT_RECURRENCE, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_NOTEBOOK_ID, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_RECIPIENTS, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_RESOURCE_ID, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_RESOURCE_TYPE, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_RRULE, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_STATUS, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_TIMEFRAME, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_TIMEZONE, + DatasetReportScheduleResponseAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatasetReportScheduleResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CELL_ID = "cell_id"; + private String cellId; + + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + private String datasetId; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_FILE_ROW_LIMIT = "file_row_limit"; + private Long fileRowLimit; + + public static final String JSON_PROPERTY_INLINE_ROW_LIMIT = "inline_row_limit"; + private Long inlineRowLimit; + + public static final String JSON_PROPERTY_NEXT_RECURRENCE = "next_recurrence"; + private Long nextRecurrence; + + public static final String JSON_PROPERTY_NOTEBOOK_ID = "notebook_id"; + private Long notebookId; + + public static final String JSON_PROPERTY_RECIPIENTS = "recipients"; + private List recipients = new ArrayList<>(); + + public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id"; + private String resourceId; + + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; + private DatasetReportScheduleResourceType resourceType; + + public static final String JSON_PROPERTY_RRULE = "rrule"; + private String rrule; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ReportScheduleStatus status; + + public static final String JSON_PROPERTY_TIMEFRAME = "timeframe"; + private String timeframe; + + public static final String JSON_PROPERTY_TIMEZONE = "timezone"; + private String timezone; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public DatasetReportScheduleResponseAttributes() {} + + @JsonCreator + public DatasetReportScheduleResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CELL_ID) String cellId, + @JsonProperty(required = true, value = JSON_PROPERTY_DATASET_ID) String datasetId, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_FILE_ROW_LIMIT) Long fileRowLimit, + @JsonProperty(required = true, value = JSON_PROPERTY_INLINE_ROW_LIMIT) Long inlineRowLimit, + @JsonProperty(required = true, value = JSON_PROPERTY_NEXT_RECURRENCE) Long nextRecurrence, + @JsonProperty(required = true, value = JSON_PROPERTY_NOTEBOOK_ID) Long notebookId, + @JsonProperty(required = true, value = JSON_PROPERTY_RECIPIENTS) List recipients, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_ID) String resourceId, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_TYPE) + DatasetReportScheduleResourceType resourceType, + @JsonProperty(required = true, value = JSON_PROPERTY_RRULE) String rrule, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) ReportScheduleStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEFRAME) String timeframe, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEZONE) String timezone, + @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { + this.cellId = cellId; + if (cellId != null) {} + this.datasetId = datasetId; + if (datasetId != null) {} + this.description = description; + this.fileRowLimit = fileRowLimit; + if (fileRowLimit != null) {} + this.inlineRowLimit = inlineRowLimit; + if (inlineRowLimit != null) {} + this.nextRecurrence = nextRecurrence; + if (nextRecurrence != null) {} + this.notebookId = notebookId; + if (notebookId != null) {} + this.recipients = recipients; + this.resourceId = resourceId; + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + this.rrule = rrule; + this.status = status; + this.unparsed |= !status.isValid(); + this.timeframe = timeframe; + this.timezone = timezone; + this.title = title; + } + + public DatasetReportScheduleResponseAttributes cellId(String cellId) { + this.cellId = cellId; + if (cellId != null) {} + return this; + } + + /** + * The identifier of the notebook cell that published the dataset, or null if not + * set. + * + * @return cellId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELL_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCellId() { + return cellId; + } + + public void setCellId(String cellId) { + this.cellId = cellId; + } + + public DatasetReportScheduleResponseAttributes datasetId(String datasetId) { + this.datasetId = datasetId; + if (datasetId != null) {} + return this; + } + + /** + * The identifier of the dataset, or null if not set. + * + * @return datasetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatasetId() { + return datasetId; + } + + public void setDatasetId(String datasetId) { + this.datasetId = datasetId; + } + + public DatasetReportScheduleResponseAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the report. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public DatasetReportScheduleResponseAttributes fileRowLimit(Long fileRowLimit) { + this.fileRowLimit = fileRowLimit; + if (fileRowLimit != null) {} + return this; + } + + /** + * The maximum number of rows included in the attached CSV file, or null if not set. + * + * @return fileRowLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_ROW_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFileRowLimit() { + return fileRowLimit; + } + + public void setFileRowLimit(Long fileRowLimit) { + this.fileRowLimit = fileRowLimit; + } + + public DatasetReportScheduleResponseAttributes inlineRowLimit(Long inlineRowLimit) { + this.inlineRowLimit = inlineRowLimit; + if (inlineRowLimit != null) {} + return this; + } + + /** + * The maximum number of rows included inline in the email body, or null if not set. + * + * @return inlineRowLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INLINE_ROW_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getInlineRowLimit() { + return inlineRowLimit; + } + + public void setInlineRowLimit(Long inlineRowLimit) { + this.inlineRowLimit = inlineRowLimit; + } + + public DatasetReportScheduleResponseAttributes nextRecurrence(Long nextRecurrence) { + this.nextRecurrence = nextRecurrence; + if (nextRecurrence != null) {} + return this; + } + + /** + * The Unix timestamp, in milliseconds, of the next scheduled delivery, or null if + * none is scheduled. + * + * @return nextRecurrence + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_RECURRENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getNextRecurrence() { + return nextRecurrence; + } + + public void setNextRecurrence(Long nextRecurrence) { + this.nextRecurrence = nextRecurrence; + } + + public DatasetReportScheduleResponseAttributes notebookId(Long notebookId) { + this.notebookId = notebookId; + if (notebookId != null) {} + return this; + } + + /** + * The identifier of the notebook containing the dataset cell, or null if not set. + * + * @return notebookId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTEBOOK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getNotebookId() { + return notebookId; + } + + public void setNotebookId(Long notebookId) { + this.notebookId = notebookId; + } + + public DatasetReportScheduleResponseAttributes recipients(List recipients) { + this.recipients = recipients; + return this; + } + + public DatasetReportScheduleResponseAttributes addRecipientsItem(String recipientsItem) { + this.recipients.add(recipientsItem); + return this; + } + + /** + * The recipients of the report (email addresses, Slack channel references, or Microsoft Teams + * channel references). + * + * @return recipients + */ + @JsonProperty(JSON_PROPERTY_RECIPIENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRecipients() { + return recipients; + } + + public void setRecipients(List recipients) { + this.recipients = recipients; + } + + public DatasetReportScheduleResponseAttributes resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The identifier of the widget containing the dataset. + * + * @return resourceId + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public DatasetReportScheduleResponseAttributes resourceType( + DatasetReportScheduleResourceType resourceType) { + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + return this; + } + + /** + * The type of resource targeted by a dataset report schedule. + * + * @return resourceType + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetReportScheduleResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(DatasetReportScheduleResourceType resourceType) { + if (!resourceType.isValid()) { + this.unparsed = true; + } + this.resourceType = resourceType; + } + + public DatasetReportScheduleResponseAttributes rrule(String rrule) { + this.rrule = rrule; + return this; + } + + /** + * The recurrence rule for the schedule, expressed as an iCalendar RRULE string. + * + * @return rrule + */ + @JsonProperty(JSON_PROPERTY_RRULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRrule() { + return rrule; + } + + public void setRrule(String rrule) { + this.rrule = rrule; + } + + public DatasetReportScheduleResponseAttributes status(ReportScheduleStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Whether the schedule is currently delivering reports (active) or paused ( + * inactive). + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleStatus getStatus() { + return status; + } + + public void setStatus(ReportScheduleStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public DatasetReportScheduleResponseAttributes timeframe(String timeframe) { + this.timeframe = timeframe; + return this; + } + + /** + * The relative timeframe of data included in the report. + * + * @return timeframe + */ + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimeframe() { + return timeframe; + } + + public void setTimeframe(String timeframe) { + this.timeframe = timeframe; + } + + public DatasetReportScheduleResponseAttributes timezone(String timezone) { + this.timezone = timezone; + return this; + } + + /** + * The IANA time zone identifier the recurrence rule is evaluated in. + * + * @return timezone + */ + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimezone() { + return timezone; + } + + public void setTimezone(String timezone) { + this.timezone = timezone; + } + + public DatasetReportScheduleResponseAttributes title(String title) { + this.title = title; + return this; + } + + /** + * The title of the report. + * + * @return title + */ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatasetReportScheduleResponseAttributes + */ + @JsonAnySetter + public DatasetReportScheduleResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatasetReportScheduleResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetReportScheduleResponseAttributes datasetReportScheduleResponseAttributes = + (DatasetReportScheduleResponseAttributes) o; + return Objects.equals(this.cellId, datasetReportScheduleResponseAttributes.cellId) + && Objects.equals(this.datasetId, datasetReportScheduleResponseAttributes.datasetId) + && Objects.equals(this.description, datasetReportScheduleResponseAttributes.description) + && Objects.equals(this.fileRowLimit, datasetReportScheduleResponseAttributes.fileRowLimit) + && Objects.equals( + this.inlineRowLimit, datasetReportScheduleResponseAttributes.inlineRowLimit) + && Objects.equals( + this.nextRecurrence, datasetReportScheduleResponseAttributes.nextRecurrence) + && Objects.equals(this.notebookId, datasetReportScheduleResponseAttributes.notebookId) + && Objects.equals(this.recipients, datasetReportScheduleResponseAttributes.recipients) + && Objects.equals(this.resourceId, datasetReportScheduleResponseAttributes.resourceId) + && Objects.equals(this.resourceType, datasetReportScheduleResponseAttributes.resourceType) + && Objects.equals(this.rrule, datasetReportScheduleResponseAttributes.rrule) + && Objects.equals(this.status, datasetReportScheduleResponseAttributes.status) + && Objects.equals(this.timeframe, datasetReportScheduleResponseAttributes.timeframe) + && Objects.equals(this.timezone, datasetReportScheduleResponseAttributes.timezone) + && Objects.equals(this.title, datasetReportScheduleResponseAttributes.title) + && Objects.equals( + this.additionalProperties, + datasetReportScheduleResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + cellId, + datasetId, + description, + fileRowLimit, + inlineRowLimit, + nextRecurrence, + notebookId, + recipients, + resourceId, + resourceType, + rrule, + status, + timeframe, + timezone, + title, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetReportScheduleResponseAttributes {\n"); + sb.append(" cellId: ").append(toIndentedString(cellId)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" fileRowLimit: ").append(toIndentedString(fileRowLimit)).append("\n"); + sb.append(" inlineRowLimit: ").append(toIndentedString(inlineRowLimit)).append("\n"); + sb.append(" nextRecurrence: ").append(toIndentedString(nextRecurrence)).append("\n"); + sb.append(" notebookId: ").append(toIndentedString(notebookId)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResponseData.java new file mode 100644 index 00000000000..bf47b38f122 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatasetReportScheduleResponseData.java @@ -0,0 +1,245 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The JSON:API data object representing a dataset report schedule. */ +@JsonPropertyOrder({ + DatasetReportScheduleResponseData.JSON_PROPERTY_ATTRIBUTES, + DatasetReportScheduleResponseData.JSON_PROPERTY_ID, + DatasetReportScheduleResponseData.JSON_PROPERTY_RELATIONSHIPS, + DatasetReportScheduleResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatasetReportScheduleResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DatasetReportScheduleResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private ReportScheduleResponseRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReportScheduleType type; + + public DatasetReportScheduleResponseData() {} + + @JsonCreator + public DatasetReportScheduleResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DatasetReportScheduleResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + ReportScheduleResponseRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReportScheduleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DatasetReportScheduleResponseData attributes( + DatasetReportScheduleResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The configuration and derived state of a report schedule for a published dataset. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatasetReportScheduleResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DatasetReportScheduleResponseAttributes attributes) { + this.attributes = attributes; + } + + public DatasetReportScheduleResponseData id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the dataset report schedule. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public DatasetReportScheduleResponseData relationships( + ReportScheduleResponseRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for the report schedule. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleResponseRelationships getRelationships() { + return relationships; + } + + public void setRelationships(ReportScheduleResponseRelationships relationships) { + this.relationships = relationships; + } + + public DatasetReportScheduleResponseData type(ReportScheduleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for report schedules. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleType getType() { + return type; + } + + public void setType(ReportScheduleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatasetReportScheduleResponseData + */ + @JsonAnySetter + public DatasetReportScheduleResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatasetReportScheduleResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatasetReportScheduleResponseData datasetReportScheduleResponseData = + (DatasetReportScheduleResponseData) o; + return Objects.equals(this.attributes, datasetReportScheduleResponseData.attributes) + && Objects.equals(this.id, datasetReportScheduleResponseData.id) + && Objects.equals(this.relationships, datasetReportScheduleResponseData.relationships) + && Objects.equals(this.type, datasetReportScheduleResponseData.type) + && Objects.equals( + this.additionalProperties, datasetReportScheduleResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatasetReportScheduleResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessor.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessor.java index 18f6e5f55c5..b96afe55b96 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessor.java +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessor.java @@ -32,6 +32,7 @@ ObservabilityPipelineTagCardinalityLimitProcessor.JSON_PROPERTY_INCLUDE, ObservabilityPipelineTagCardinalityLimitProcessor.JSON_PROPERTY_LIMIT_EXCEEDED_ACTION, ObservabilityPipelineTagCardinalityLimitProcessor.JSON_PROPERTY_PER_METRIC_LIMITS, + ObservabilityPipelineTagCardinalityLimitProcessor.JSON_PROPERTY_TRACKING_MODE, ObservabilityPipelineTagCardinalityLimitProcessor.JSON_PROPERTY_TYPE, ObservabilityPipelineTagCardinalityLimitProcessor.JSON_PROPERTY_VALUE_LIMIT }) @@ -58,6 +59,9 @@ public class ObservabilityPipelineTagCardinalityLimitProcessor { private List perMetricLimits = null; + public static final String JSON_PROPERTY_TRACKING_MODE = "tracking_mode"; + private ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode trackingMode; + public static final String JSON_PROPERTY_TYPE = "type"; private ObservabilityPipelineTagCardinalityLimitProcessorType type = ObservabilityPipelineTagCardinalityLimitProcessorType.TAG_CARDINALITY_LIMIT; @@ -74,6 +78,8 @@ public ObservabilityPipelineTagCardinalityLimitProcessor( @JsonProperty(required = true, value = JSON_PROPERTY_INCLUDE) String include, @JsonProperty(required = true, value = JSON_PROPERTY_LIMIT_EXCEEDED_ACTION) ObservabilityPipelineTagCardinalityLimitProcessorAction limitExceededAction, + @JsonProperty(required = true, value = JSON_PROPERTY_TRACKING_MODE) + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode trackingMode, @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ObservabilityPipelineTagCardinalityLimitProcessorType type, @JsonProperty(required = true, value = JSON_PROPERTY_VALUE_LIMIT) Long valueLimit) { @@ -82,6 +88,8 @@ public ObservabilityPipelineTagCardinalityLimitProcessor( this.include = include; this.limitExceededAction = limitExceededAction; this.unparsed |= !limitExceededAction.isValid(); + this.trackingMode = trackingMode; + this.unparsed |= trackingMode.unparsed; this.type = type; this.unparsed |= !type.isValid(); this.valueLimit = valueLimit; @@ -233,6 +241,29 @@ public void setPerMetricLimits( this.perMetricLimits = perMetricLimits; } + public ObservabilityPipelineTagCardinalityLimitProcessor trackingMode( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode trackingMode) { + this.trackingMode = trackingMode; + this.unparsed |= trackingMode.unparsed; + return this; + } + + /** + * Controls whether the processor uses exact or probabilistic tag tracking. + * + * @return trackingMode + */ + @JsonProperty(JSON_PROPERTY_TRACKING_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode getTrackingMode() { + return trackingMode; + } + + public void setTrackingMode( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode trackingMode) { + this.trackingMode = trackingMode; + } + public ObservabilityPipelineTagCardinalityLimitProcessor type( ObservabilityPipelineTagCardinalityLimitProcessorType type) { this.type = type; @@ -348,6 +379,8 @@ public boolean equals(Object o) { observabilityPipelineTagCardinalityLimitProcessor.limitExceededAction) && Objects.equals( this.perMetricLimits, observabilityPipelineTagCardinalityLimitProcessor.perMetricLimits) + && Objects.equals( + this.trackingMode, observabilityPipelineTagCardinalityLimitProcessor.trackingMode) && Objects.equals(this.type, observabilityPipelineTagCardinalityLimitProcessor.type) && Objects.equals( this.valueLimit, observabilityPipelineTagCardinalityLimitProcessor.valueLimit) @@ -365,6 +398,7 @@ public int hashCode() { include, limitExceededAction, perMetricLimits, + trackingMode, type, valueLimit, additionalProperties); @@ -382,6 +416,7 @@ public String toString() { .append(toIndentedString(limitExceededAction)) .append("\n"); sb.append(" perMetricLimits: ").append(toIndentedString(perMetricLimits)).append("\n"); + sb.append(" trackingMode: ").append(toIndentedString(trackingMode)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" valueLimit: ").append(toIndentedString(valueLimit)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType.java similarity index 58% rename from src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode.java rename to src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType.java index 6ea8b34f1f9..91a42170d11 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode.java +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType.java @@ -19,41 +19,42 @@ import java.util.Set; /** - * How the per-tag override is applied. limit_override enforces a custom limit on the - * tag; excluded skips the tag from cardinality tracking. + * How the override is applied. limit_override enforces a custom limit; excluded + * omits the metric or tag from cardinality tracking. */ @JsonSerialize( using = - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode - .ObservabilityPipelineTagCardinalityLimitProcessorPerTagModeSerializer.class) -public class ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode extends ModelEnum { + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType + .ObservabilityPipelineTagCardinalityLimitProcessorOverrideTypeSerializer.class) +public class ObservabilityPipelineTagCardinalityLimitProcessorOverrideType + extends ModelEnum { private static final Set allowedValues = new HashSet(Arrays.asList("limit_override", "excluded")); - public static final ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode LIMIT_OVERRIDE = - new ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode("limit_override"); - public static final ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode EXCLUDED = - new ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode("excluded"); + public static final ObservabilityPipelineTagCardinalityLimitProcessorOverrideType LIMIT_OVERRIDE = + new ObservabilityPipelineTagCardinalityLimitProcessorOverrideType("limit_override"); + public static final ObservabilityPipelineTagCardinalityLimitProcessorOverrideType EXCLUDED = + new ObservabilityPipelineTagCardinalityLimitProcessorOverrideType("excluded"); - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode(String value) { + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType(String value) { super(value, allowedValues); } - public static class ObservabilityPipelineTagCardinalityLimitProcessorPerTagModeSerializer - extends StdSerializer { - public ObservabilityPipelineTagCardinalityLimitProcessorPerTagModeSerializer( - Class t) { + public static class ObservabilityPipelineTagCardinalityLimitProcessorOverrideTypeSerializer + extends StdSerializer { + public ObservabilityPipelineTagCardinalityLimitProcessorOverrideTypeSerializer( + Class t) { super(t); } - public ObservabilityPipelineTagCardinalityLimitProcessorPerTagModeSerializer() { + public ObservabilityPipelineTagCardinalityLimitProcessorOverrideTypeSerializer() { this(null); } @Override public void serialize( - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode value, + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { @@ -62,8 +63,8 @@ public void serialize( } @JsonCreator - public static ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode fromValue( + public static ObservabilityPipelineTagCardinalityLimitProcessorOverrideType fromValue( String value) { - return new ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode(value); + return new ObservabilityPipelineTagCardinalityLimitProcessorOverrideType(value); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.java index b3bea91a9de..f7ee517c365 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.java +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.java @@ -24,7 +24,7 @@ ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit .JSON_PROPERTY_LIMIT_EXCEEDED_ACTION, ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.JSON_PROPERTY_METRIC_NAME, - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.JSON_PROPERTY_MODE, + ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.JSON_PROPERTY_OVERRIDE_TYPE, ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.JSON_PROPERTY_PER_TAG_LIMITS, ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.JSON_PROPERTY_VALUE_LIMIT }) @@ -38,8 +38,8 @@ public class ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit { public static final String JSON_PROPERTY_METRIC_NAME = "metric_name"; private String metricName; - public static final String JSON_PROPERTY_MODE = "mode"; - private ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode mode; + public static final String JSON_PROPERTY_OVERRIDE_TYPE = "override_type"; + private ObservabilityPipelineTagCardinalityLimitProcessorOverrideType overrideType; public static final String JSON_PROPERTY_PER_TAG_LIMITS = "per_tag_limits"; private List perTagLimits = null; @@ -52,11 +52,11 @@ public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit() {} @JsonCreator public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit( @JsonProperty(required = true, value = JSON_PROPERTY_METRIC_NAME) String metricName, - @JsonProperty(required = true, value = JSON_PROPERTY_MODE) - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode mode) { + @JsonProperty(required = true, value = JSON_PROPERTY_OVERRIDE_TYPE) + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType overrideType) { this.metricName = metricName; - this.mode = mode; - this.unparsed |= !mode.isValid(); + this.overrideType = overrideType; + this.unparsed |= !overrideType.isValid(); } public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit limitExceededAction( @@ -107,30 +107,31 @@ public void setMetricName(String metricName) { this.metricName = metricName; } - public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit mode( - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode mode) { - this.mode = mode; - this.unparsed |= !mode.isValid(); + public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit overrideType( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType overrideType) { + this.overrideType = overrideType; + this.unparsed |= !overrideType.isValid(); return this; } /** - * How the per-metric override is applied. tracked enforces a custom limit; - * excluded skips the metric entirely. + * How the override is applied. limit_override enforces a custom limit; + * excluded omits the metric or tag from cardinality tracking. * - * @return mode + * @return overrideType */ - @JsonProperty(JSON_PROPERTY_MODE) + @JsonProperty(JSON_PROPERTY_OVERRIDE_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode getMode() { - return mode; + public ObservabilityPipelineTagCardinalityLimitProcessorOverrideType getOverrideType() { + return overrideType; } - public void setMode(ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode mode) { - if (!mode.isValid()) { + public void setOverrideType( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType overrideType) { + if (!overrideType.isValid()) { this.unparsed = true; } - this.mode = mode; + this.overrideType = overrideType; } public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit perTagLimits( @@ -154,7 +155,7 @@ public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit addPerTag /** * A list of per-tag cardinality overrides that apply within this metric. Must be omitted when - * mode is excluded. + * override_type is excluded. * * @return perTagLimits */ @@ -178,8 +179,8 @@ public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit valueLimi /** * The maximum number of distinct tag value combinations allowed for this metric. Required when - * mode is tracked. Must be omitted when mode is - * excluded. minimum: 0 maximum: 1000000 + * override_type is limit_override. Must be omitted when + * override_type is excluded. minimum: 0 maximum: 1000000 * * @return valueLimit */ @@ -263,7 +264,8 @@ public boolean equals(Object o) { this.metricName, observabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.metricName) && Objects.equals( - this.mode, observabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.mode) + this.overrideType, + observabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.overrideType) && Objects.equals( this.perTagLimits, observabilityPipelineTagCardinalityLimitProcessorPerMetricLimit.perTagLimits) @@ -278,7 +280,12 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - limitExceededAction, metricName, mode, perTagLimits, valueLimit, additionalProperties); + limitExceededAction, + metricName, + overrideType, + perTagLimits, + valueLimit, + additionalProperties); } @Override @@ -289,7 +296,7 @@ public String toString() { .append(toIndentedString(limitExceededAction)) .append("\n"); sb.append(" metricName: ").append(toIndentedString(metricName)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" overrideType: ").append(toIndentedString(overrideType)).append("\n"); sb.append(" perTagLimits: ").append(toIndentedString(perTagLimits)).append("\n"); sb.append(" valueLimit: ").append(toIndentedString(valueLimit)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit.java index e068e8b5256..d4085e44396 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit.java +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit.java @@ -19,7 +19,7 @@ /** A cardinality override for a specific tag key within a per-metric limit. */ @JsonPropertyOrder({ - ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit.JSON_PROPERTY_MODE, + ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit.JSON_PROPERTY_OVERRIDE_TYPE, ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit.JSON_PROPERTY_TAG_KEY, ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit.JSON_PROPERTY_VALUE_LIMIT }) @@ -27,8 +27,8 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_MODE = "mode"; - private ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode mode; + public static final String JSON_PROPERTY_OVERRIDE_TYPE = "override_type"; + private ObservabilityPipelineTagCardinalityLimitProcessorOverrideType overrideType; public static final String JSON_PROPERTY_TAG_KEY = "tag_key"; private String tagKey; @@ -40,38 +40,39 @@ public ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit() {} @JsonCreator public ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit( - @JsonProperty(required = true, value = JSON_PROPERTY_MODE) - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode mode, + @JsonProperty(required = true, value = JSON_PROPERTY_OVERRIDE_TYPE) + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType overrideType, @JsonProperty(required = true, value = JSON_PROPERTY_TAG_KEY) String tagKey) { - this.mode = mode; - this.unparsed |= !mode.isValid(); + this.overrideType = overrideType; + this.unparsed |= !overrideType.isValid(); this.tagKey = tagKey; } - public ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit mode( - ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode mode) { - this.mode = mode; - this.unparsed |= !mode.isValid(); + public ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit overrideType( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType overrideType) { + this.overrideType = overrideType; + this.unparsed |= !overrideType.isValid(); return this; } /** - * How the per-tag override is applied. limit_override enforces a custom limit on the - * tag; excluded skips the tag from cardinality tracking. + * How the override is applied. limit_override enforces a custom limit; + * excluded omits the metric or tag from cardinality tracking. * - * @return mode + * @return overrideType */ - @JsonProperty(JSON_PROPERTY_MODE) + @JsonProperty(JSON_PROPERTY_OVERRIDE_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode getMode() { - return mode; + public ObservabilityPipelineTagCardinalityLimitProcessorOverrideType getOverrideType() { + return overrideType; } - public void setMode(ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode mode) { - if (!mode.isValid()) { + public void setOverrideType( + ObservabilityPipelineTagCardinalityLimitProcessorOverrideType overrideType) { + if (!overrideType.isValid()) { this.unparsed = true; } - this.mode = mode; + this.overrideType = overrideType; } public ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit tagKey(String tagKey) { @@ -100,9 +101,9 @@ public ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit valueLimit(L } /** - * The maximum number of distinct values allowed for this tag. Required when mode is - * limit_override. Must be omitted when mode is excluded. - * minimum: 0 maximum: 1000000 + * The maximum number of distinct values allowed for this tag. Required when override_type + * is limit_override. Must be omitted when override_type is + * excluded. minimum: 0 maximum: 1000000 * * @return valueLimit */ @@ -180,7 +181,8 @@ public boolean equals(Object o) { observabilityPipelineTagCardinalityLimitProcessorPerTagLimit = (ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit) o; return Objects.equals( - this.mode, observabilityPipelineTagCardinalityLimitProcessorPerTagLimit.mode) + this.overrideType, + observabilityPipelineTagCardinalityLimitProcessorPerTagLimit.overrideType) && Objects.equals( this.tagKey, observabilityPipelineTagCardinalityLimitProcessorPerTagLimit.tagKey) && Objects.equals( @@ -193,14 +195,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(mode, tagKey, valueLimit, additionalProperties); + return Objects.hash(overrideType, tagKey, valueLimit, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit {\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" overrideType: ").append(toIndentedString(overrideType)).append("\n"); sb.append(" tagKey: ").append(toIndentedString(tagKey)).append("\n"); sb.append(" valueLimit: ").append(toIndentedString(valueLimit)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode.java new file mode 100644 index 00000000000..11953173d74 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode.java @@ -0,0 +1,161 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Controls whether the processor uses exact or probabilistic tag tracking. */ +@JsonPropertyOrder({ + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode.JSON_PROPERTY_MODE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MODE = "mode"; + private ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode mode; + + public ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode() {} + + @JsonCreator + public ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode( + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + } + + public ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode mode( + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * The cardinality tracking algorithm to use. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode getMode() { + return mode; + } + + public void setMode(ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode + */ + @JsonAnySetter + public ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode + observabilityPipelineTagCardinalityLimitProcessorTrackingMode = + (ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode) o; + return Objects.equals( + this.mode, observabilityPipelineTagCardinalityLimitProcessorTrackingMode.mode) + && Objects.equals( + this.additionalProperties, + observabilityPipelineTagCardinalityLimitProcessorTrackingMode.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(mode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode {\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode.java similarity index 56% rename from src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode.java rename to src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode.java index 494fce07c65..7dadc6f0507 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode.java +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode.java @@ -18,43 +18,43 @@ import java.util.HashSet; import java.util.Set; -/** - * How the per-metric override is applied. tracked enforces a custom limit; - * excluded skips the metric entirely. - */ +/** The cardinality tracking algorithm to use. */ @JsonSerialize( using = - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode - .ObservabilityPipelineTagCardinalityLimitProcessorPerMetricModeSerializer.class) -public class ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode + .ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeModeSerializer.class) +public class ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode extends ModelEnum { private static final Set allowedValues = - new HashSet(Arrays.asList("tracked", "excluded")); + new HashSet(Arrays.asList("exact_fingerprint", "probabilistic")); - public static final ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode TRACKED = - new ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode("tracked"); - public static final ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode EXCLUDED = - new ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode("excluded"); + public static final ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode + EXACT_FINGERPRINT = + new ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode( + "exact_fingerprint"); + public static final ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode + PROBABILISTIC = + new ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode("probabilistic"); - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode(String value) { + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode(String value) { super(value, allowedValues); } - public static class ObservabilityPipelineTagCardinalityLimitProcessorPerMetricModeSerializer - extends StdSerializer { - public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricModeSerializer( - Class t) { + public static class ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeModeSerializer + extends StdSerializer { + public ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeModeSerializer( + Class t) { super(t); } - public ObservabilityPipelineTagCardinalityLimitProcessorPerMetricModeSerializer() { + public ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeModeSerializer() { this(null); } @Override public void serialize( - ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode value, + ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { @@ -63,8 +63,8 @@ public void serialize( } @JsonCreator - public static ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode fromValue( + public static ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode fromValue( String value) { - return new ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode(value); + return new ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode(value); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/PrintReportRequest.java b/src/main/java/com/datadog/api/client/v2/model/PrintReportRequest.java new file mode 100644 index 00000000000..cd84ba7bb91 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PrintReportRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for initiating a print-only report. */ +@JsonPropertyOrder({PrintReportRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PrintReportRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private PrintReportRequestData data; + + public PrintReportRequest() {} + + @JsonCreator + public PrintReportRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) PrintReportRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public PrintReportRequest data(PrintReportRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The JSON:API data object for a print report request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PrintReportRequestData getData() { + return data; + } + + public void setData(PrintReportRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PrintReportRequest + */ + @JsonAnySetter + public PrintReportRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PrintReportRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrintReportRequest printReportRequest = (PrintReportRequest) o; + return Objects.equals(this.data, printReportRequest.data) + && Objects.equals(this.additionalProperties, printReportRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrintReportRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PrintReportRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PrintReportRequestAttributes.java new file mode 100644 index 00000000000..112f2353425 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PrintReportRequestAttributes.java @@ -0,0 +1,346 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The configuration for a print-only report. Specify exactly one of timeframe (for a + * relative time window) or both from_ts and to_ts (for an absolute time + * range). + */ +@JsonPropertyOrder({ + PrintReportRequestAttributes.JSON_PROPERTY_FROM_TS, + PrintReportRequestAttributes.JSON_PROPERTY_RESOURCE_ID, + PrintReportRequestAttributes.JSON_PROPERTY_RESOURCE_TYPE, + PrintReportRequestAttributes.JSON_PROPERTY_TEMPLATE_VARIABLES, + PrintReportRequestAttributes.JSON_PROPERTY_TIMEFRAME, + PrintReportRequestAttributes.JSON_PROPERTY_TIMEZONE, + PrintReportRequestAttributes.JSON_PROPERTY_TO_TS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PrintReportRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FROM_TS = "from_ts"; + private Long fromTs; + + public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id"; + private String resourceId; + + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; + private ReportScheduleResourceType resourceType; + + public static final String JSON_PROPERTY_TEMPLATE_VARIABLES = "template_variables"; + private List templateVariables = new ArrayList<>(); + + public static final String JSON_PROPERTY_TIMEFRAME = "timeframe"; + private String timeframe; + + public static final String JSON_PROPERTY_TIMEZONE = "timezone"; + private String timezone; + + public static final String JSON_PROPERTY_TO_TS = "to_ts"; + private Long toTs; + + public PrintReportRequestAttributes() {} + + @JsonCreator + public PrintReportRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_ID) String resourceId, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_TYPE) + ReportScheduleResourceType resourceType, + @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE_VARIABLES) + List templateVariables, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEZONE) String timezone) { + this.resourceId = resourceId; + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + this.templateVariables = templateVariables; + this.timezone = timezone; + } + + public PrintReportRequestAttributes fromTs(Long fromTs) { + this.fromTs = fromTs; + return this; + } + + /** + * The start of an absolute time range, as a Unix timestamp in milliseconds. Required when + * timeframe is omitted. + * + * @return fromTs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM_TS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFromTs() { + return fromTs; + } + + public void setFromTs(Long fromTs) { + this.fromTs = fromTs; + } + + public PrintReportRequestAttributes resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The identifier of the dashboard or integration dashboard to render. + * + * @return resourceId + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public PrintReportRequestAttributes resourceType(ReportScheduleResourceType resourceType) { + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + return this; + } + + /** + * The type of dashboard resource the report schedule targets. + * + * @return resourceType + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(ReportScheduleResourceType resourceType) { + if (!resourceType.isValid()) { + this.unparsed = true; + } + this.resourceType = resourceType; + } + + public PrintReportRequestAttributes templateVariables( + List templateVariables) { + this.templateVariables = templateVariables; + for (ReportScheduleTemplateVariable item : templateVariables) { + this.unparsed |= item.unparsed; + } + return this; + } + + public PrintReportRequestAttributes addTemplateVariablesItem( + ReportScheduleTemplateVariable templateVariablesItem) { + this.templateVariables.add(templateVariablesItem); + this.unparsed |= templateVariablesItem.unparsed; + return this; + } + + /** + * The dashboard template variables applied when rendering the report. + * + * @return templateVariables + */ + @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateVariables() { + return templateVariables; + } + + public void setTemplateVariables(List templateVariables) { + this.templateVariables = templateVariables; + } + + public PrintReportRequestAttributes timeframe(String timeframe) { + this.timeframe = timeframe; + return this; + } + + /** + * A relative time window (for example 1w or calendar_month). Mutually + * exclusive with from_ts and to_ts. + * + * @return timeframe + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTimeframe() { + return timeframe; + } + + public void setTimeframe(String timeframe) { + this.timeframe = timeframe; + } + + public PrintReportRequestAttributes timezone(String timezone) { + this.timezone = timezone; + return this; + } + + /** + * The IANA time zone identifier used to evaluate the time window. + * + * @return timezone + */ + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimezone() { + return timezone; + } + + public void setTimezone(String timezone) { + this.timezone = timezone; + } + + public PrintReportRequestAttributes toTs(Long toTs) { + this.toTs = toTs; + return this; + } + + /** + * The end of an absolute time range, as a Unix timestamp in milliseconds. Required when + * timeframe is omitted. + * + * @return toTs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO_TS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getToTs() { + return toTs; + } + + public void setToTs(Long toTs) { + this.toTs = toTs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PrintReportRequestAttributes + */ + @JsonAnySetter + public PrintReportRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PrintReportRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrintReportRequestAttributes printReportRequestAttributes = (PrintReportRequestAttributes) o; + return Objects.equals(this.fromTs, printReportRequestAttributes.fromTs) + && Objects.equals(this.resourceId, printReportRequestAttributes.resourceId) + && Objects.equals(this.resourceType, printReportRequestAttributes.resourceType) + && Objects.equals(this.templateVariables, printReportRequestAttributes.templateVariables) + && Objects.equals(this.timeframe, printReportRequestAttributes.timeframe) + && Objects.equals(this.timezone, printReportRequestAttributes.timezone) + && Objects.equals(this.toTs, printReportRequestAttributes.toTs) + && Objects.equals( + this.additionalProperties, printReportRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + fromTs, + resourceId, + resourceType, + templateVariables, + timeframe, + timezone, + toTs, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrintReportRequestAttributes {\n"); + sb.append(" fromTs: ").append(toIndentedString(fromTs)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" templateVariables: ").append(toIndentedString(templateVariables)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" toTs: ").append(toIndentedString(toTs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PrintReportRequestData.java b/src/main/java/com/datadog/api/client/v2/model/PrintReportRequestData.java new file mode 100644 index 00000000000..a6780c5b35e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PrintReportRequestData.java @@ -0,0 +1,183 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The JSON:API data object for a print report request. */ +@JsonPropertyOrder({ + PrintReportRequestData.JSON_PROPERTY_ATTRIBUTES, + PrintReportRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PrintReportRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PrintReportRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private PrintReportType type; + + public PrintReportRequestData() {} + + @JsonCreator + public PrintReportRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + PrintReportRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) PrintReportType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PrintReportRequestData attributes(PrintReportRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The configuration for a print-only report. Specify exactly one of timeframe (for a + * relative time window) or both from_ts and to_ts (for an absolute time + * range). + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PrintReportRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(PrintReportRequestAttributes attributes) { + this.attributes = attributes; + } + + public PrintReportRequestData type(PrintReportType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a print-only report. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PrintReportType getType() { + return type; + } + + public void setType(PrintReportType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PrintReportRequestData + */ + @JsonAnySetter + public PrintReportRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PrintReportRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrintReportRequestData printReportRequestData = (PrintReportRequestData) o; + return Objects.equals(this.attributes, printReportRequestData.attributes) + && Objects.equals(this.type, printReportRequestData.type) + && Objects.equals(this.additionalProperties, printReportRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrintReportRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PrintReportResponse.java b/src/main/java/com/datadog/api/client/v2/model/PrintReportResponse.java new file mode 100644 index 00000000000..8789f2e2f65 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PrintReportResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the initiated print-only report. */ +@JsonPropertyOrder({PrintReportResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PrintReportResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private PrintReportResponseData data; + + public PrintReportResponse() {} + + @JsonCreator + public PrintReportResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) PrintReportResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public PrintReportResponse data(PrintReportResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The JSON:API data object for a print-only report. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PrintReportResponseData getData() { + return data; + } + + public void setData(PrintReportResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PrintReportResponse + */ + @JsonAnySetter + public PrintReportResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PrintReportResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrintReportResponse printReportResponse = (PrintReportResponse) o; + return Objects.equals(this.data, printReportResponse.data) + && Objects.equals(this.additionalProperties, printReportResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrintReportResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PrintReportResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PrintReportResponseAttributes.java new file mode 100644 index 00000000000..39a731a8740 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PrintReportResponseAttributes.java @@ -0,0 +1,370 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The configuration and download URL for the initiated print-only report. */ +@JsonPropertyOrder({ + PrintReportResponseAttributes.JSON_PROPERTY_DOWNLOAD_URL, + PrintReportResponseAttributes.JSON_PROPERTY_FROM_TS, + PrintReportResponseAttributes.JSON_PROPERTY_RESOURCE_ID, + PrintReportResponseAttributes.JSON_PROPERTY_RESOURCE_TYPE, + PrintReportResponseAttributes.JSON_PROPERTY_TEMPLATE_VARIABLES, + PrintReportResponseAttributes.JSON_PROPERTY_TIMEFRAME, + PrintReportResponseAttributes.JSON_PROPERTY_TIMEZONE, + PrintReportResponseAttributes.JSON_PROPERTY_TO_TS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PrintReportResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DOWNLOAD_URL = "download_url"; + private String downloadUrl; + + public static final String JSON_PROPERTY_FROM_TS = "from_ts"; + private Long fromTs; + + public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id"; + private String resourceId; + + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; + private ReportScheduleResourceType resourceType; + + public static final String JSON_PROPERTY_TEMPLATE_VARIABLES = "template_variables"; + private List templateVariables = new ArrayList<>(); + + public static final String JSON_PROPERTY_TIMEFRAME = "timeframe"; + private String timeframe; + + public static final String JSON_PROPERTY_TIMEZONE = "timezone"; + private String timezone; + + public static final String JSON_PROPERTY_TO_TS = "to_ts"; + private Long toTs; + + public PrintReportResponseAttributes() {} + + @JsonCreator + public PrintReportResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DOWNLOAD_URL) String downloadUrl, + @JsonProperty(required = true, value = JSON_PROPERTY_FROM_TS) Long fromTs, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_ID) String resourceId, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_TYPE) + ReportScheduleResourceType resourceType, + @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE_VARIABLES) + List templateVariables, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEZONE) String timezone, + @JsonProperty(required = true, value = JSON_PROPERTY_TO_TS) Long toTs) { + this.downloadUrl = downloadUrl; + this.fromTs = fromTs; + this.resourceId = resourceId; + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + this.templateVariables = templateVariables; + this.timezone = timezone; + this.toTs = toTs; + } + + public PrintReportResponseAttributes downloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + return this; + } + + /** + * The URL from which the rendered PDF report can be downloaded. + * + * @return downloadUrl + */ + @JsonProperty(JSON_PROPERTY_DOWNLOAD_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } + + public PrintReportResponseAttributes fromTs(Long fromTs) { + this.fromTs = fromTs; + return this; + } + + /** + * The start of the rendered time range, as a Unix timestamp in milliseconds. + * + * @return fromTs + */ + @JsonProperty(JSON_PROPERTY_FROM_TS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFromTs() { + return fromTs; + } + + public void setFromTs(Long fromTs) { + this.fromTs = fromTs; + } + + public PrintReportResponseAttributes resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The identifier of the dashboard or integration dashboard. + * + * @return resourceId + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public PrintReportResponseAttributes resourceType(ReportScheduleResourceType resourceType) { + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + return this; + } + + /** + * The type of dashboard resource the report schedule targets. + * + * @return resourceType + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(ReportScheduleResourceType resourceType) { + if (!resourceType.isValid()) { + this.unparsed = true; + } + this.resourceType = resourceType; + } + + public PrintReportResponseAttributes templateVariables( + List templateVariables) { + this.templateVariables = templateVariables; + for (ReportScheduleTemplateVariable item : templateVariables) { + this.unparsed |= item.unparsed; + } + return this; + } + + public PrintReportResponseAttributes addTemplateVariablesItem( + ReportScheduleTemplateVariable templateVariablesItem) { + this.templateVariables.add(templateVariablesItem); + this.unparsed |= templateVariablesItem.unparsed; + return this; + } + + /** + * The dashboard template variables applied when rendering the report. + * + * @return templateVariables + */ + @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateVariables() { + return templateVariables; + } + + public void setTemplateVariables(List templateVariables) { + this.templateVariables = templateVariables; + } + + public PrintReportResponseAttributes timeframe(String timeframe) { + this.timeframe = timeframe; + return this; + } + + /** + * The relative time window used, if one was specified in the request. + * + * @return timeframe + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTimeframe() { + return timeframe; + } + + public void setTimeframe(String timeframe) { + this.timeframe = timeframe; + } + + public PrintReportResponseAttributes timezone(String timezone) { + this.timezone = timezone; + return this; + } + + /** + * The IANA time zone identifier used when rendering the report. + * + * @return timezone + */ + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimezone() { + return timezone; + } + + public void setTimezone(String timezone) { + this.timezone = timezone; + } + + public PrintReportResponseAttributes toTs(Long toTs) { + this.toTs = toTs; + return this; + } + + /** + * The end of the rendered time range, as a Unix timestamp in milliseconds. + * + * @return toTs + */ + @JsonProperty(JSON_PROPERTY_TO_TS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getToTs() { + return toTs; + } + + public void setToTs(Long toTs) { + this.toTs = toTs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PrintReportResponseAttributes + */ + @JsonAnySetter + public PrintReportResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PrintReportResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrintReportResponseAttributes printReportResponseAttributes = (PrintReportResponseAttributes) o; + return Objects.equals(this.downloadUrl, printReportResponseAttributes.downloadUrl) + && Objects.equals(this.fromTs, printReportResponseAttributes.fromTs) + && Objects.equals(this.resourceId, printReportResponseAttributes.resourceId) + && Objects.equals(this.resourceType, printReportResponseAttributes.resourceType) + && Objects.equals(this.templateVariables, printReportResponseAttributes.templateVariables) + && Objects.equals(this.timeframe, printReportResponseAttributes.timeframe) + && Objects.equals(this.timezone, printReportResponseAttributes.timezone) + && Objects.equals(this.toTs, printReportResponseAttributes.toTs) + && Objects.equals( + this.additionalProperties, printReportResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + downloadUrl, + fromTs, + resourceId, + resourceType, + templateVariables, + timeframe, + timezone, + toTs, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrintReportResponseAttributes {\n"); + sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n"); + sb.append(" fromTs: ").append(toIndentedString(fromTs)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" templateVariables: ").append(toIndentedString(templateVariables)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" toTs: ").append(toIndentedString(toTs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PrintReportResponseData.java b/src/main/java/com/datadog/api/client/v2/model/PrintReportResponseData.java new file mode 100644 index 00000000000..77db90150e7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PrintReportResponseData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The JSON:API data object for a print-only report. */ +@JsonPropertyOrder({ + PrintReportResponseData.JSON_PROPERTY_ATTRIBUTES, + PrintReportResponseData.JSON_PROPERTY_ID, + PrintReportResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PrintReportResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PrintReportResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private PrintReportType type; + + public PrintReportResponseData() {} + + @JsonCreator + public PrintReportResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + PrintReportResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) PrintReportType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PrintReportResponseData attributes(PrintReportResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The configuration and download URL for the initiated print-only report. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PrintReportResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(PrintReportResponseAttributes attributes) { + this.attributes = attributes; + } + + public PrintReportResponseData id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the report. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public PrintReportResponseData type(PrintReportType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a print-only report. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PrintReportType getType() { + return type; + } + + public void setType(PrintReportType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PrintReportResponseData + */ + @JsonAnySetter + public PrintReportResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PrintReportResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrintReportResponseData printReportResponseData = (PrintReportResponseData) o; + return Objects.equals(this.attributes, printReportResponseData.attributes) + && Objects.equals(this.id, printReportResponseData.id) + && Objects.equals(this.type, printReportResponseData.type) + && Objects.equals(this.additionalProperties, printReportResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrintReportResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PrintReportType.java b/src/main/java/com/datadog/api/client/v2/model/PrintReportType.java new file mode 100644 index 00000000000..846e1e918d7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PrintReportType.java @@ -0,0 +1,53 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** JSON:API resource type for a print-only report. */ +@JsonSerialize(using = PrintReportType.PrintReportTypeSerializer.class) +public class PrintReportType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("report")); + + public static final PrintReportType REPORT = new PrintReportType("report"); + + PrintReportType(String value) { + super(value, allowedValues); + } + + public static class PrintReportTypeSerializer extends StdSerializer { + public PrintReportTypeSerializer(Class t) { + super(t); + } + + public PrintReportTypeSerializer() { + this(null); + } + + @Override + public void serialize(PrintReportType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static PrintReportType fromValue(String value) { + return new PrintReportType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/report_schedules.feature b/src/test/resources/com/datadog/api/client/v2/api/report_schedules.feature index aa62a5e3506..04045488710 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/report_schedules.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/report_schedules.feature @@ -99,6 +99,27 @@ Feature: Report Schedules When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: List dataset report schedules returns "Bad Request" response + Given new "ListDatasetReportSchedules" request + And request contains "dataset_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: List dataset report schedules returns "Not Found" response + Given new "ListDatasetReportSchedules" request + And request contains "dataset_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: List dataset report schedules returns "OK" response + Given new "ListDatasetReportSchedules" request + And request contains "dataset_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/reporting-and-sharing Scenario: List report schedules returns "Bad Request" response Given new "ListReportSchedules" request @@ -117,6 +138,34 @@ Feature: Report Schedules When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Print a report returns "Bad Request" response + Given new "PrintReport" request + And body with value {"data": {"attributes": {"from_ts": 1780318800000, "resource_id": "abc-def-ghi", "resource_type": "dashboard", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "1w", "timezone": "America/New_York", "to_ts": 1780923600000}, "type": "report"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Print a report returns "Not Found" response + Given new "PrintReport" request + And body with value {"data": {"attributes": {"from_ts": 1780318800000, "resource_id": "abc-def-ghi", "resource_type": "dashboard", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "1w", "timezone": "America/New_York", "to_ts": 1780923600000}, "type": "report"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Print a report returns "OK" response + Given new "PrintReport" request + And body with value {"data": {"attributes": {"from_ts": 1780318800000, "resource_id": "abc-def-ghi", "resource_type": "dashboard", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "1w", "timezone": "America/New_York", "to_ts": 1780923600000}, "type": "report"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Print a report returns "Unprocessable Entity" response + Given new "PrintReport" request + And body with value {"data": {"attributes": {"from_ts": 1780318800000, "resource_id": "abc-def-ghi", "resource_type": "dashboard", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "1w", "timezone": "America/New_York", "to_ts": 1780923600000}, "type": "report"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Toggle a report schedule returns "Bad Request" response Given new "ToggleReportSchedule" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 22089f0ecea..36d5bd4d947 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -6470,6 +6470,18 @@ "type": "idempotent" } }, + "ListDatasetReportSchedules": { + "tag": "Report Schedules", + "undo": { + "type": "safe" + } + }, + "PrintReport": { + "tag": "Report Schedules", + "undo": { + "type": "unsafe" + } + }, "CreateReportSchedule": { "tag": "Report Schedules", "undo": {