diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 74b9de40104..938cc42c80a 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -71719,6 +71719,390 @@ components:
type: string
x-enum-varnames:
- RULESET
+ ReportScheduleAuthor:
+ description: A user included as a related JSON:API resource.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/ReportScheduleAuthorAttributes"
+ id:
+ description: The user UUID.
+ example: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
+ type: string
+ type:
+ $ref: "#/components/schemas/ReportScheduleAuthorType"
+ required:
+ - type
+ - id
+ - attributes
+ type: object
+ ReportScheduleAuthorAttributes:
+ description: Attributes of the report author.
+ properties:
+ email:
+ description: The email address of the report author, or `null` if unavailable.
+ example: "user@example.com"
+ nullable: true
+ type: string
+ name:
+ description: The display name of the report author, or `null` if unavailable.
+ example: "Example User"
+ nullable: true
+ type: string
+ required:
+ - name
+ - email
+ type: object
+ ReportScheduleAuthorType:
+ description: JSON:API resource type for the included report author.
+ enum:
+ - users
+ example: users
+ type: string
+ x-enum-varnames:
+ - USERS
+ ReportScheduleCreateRequest:
+ description: Request body for creating a report schedule.
+ properties:
+ data:
+ $ref: "#/components/schemas/ReportScheduleCreateRequestData"
+ required:
+ - data
+ type: object
+ ReportScheduleCreateRequestAttributes:
+ description: The configuration of the report schedule to create.
+ properties:
+ delivery_format:
+ $ref: "#/components/schemas/ReportScheduleDeliveryFormat"
+ description:
+ description: A description of the report, up to 4096 characters.
+ example: "Weekly summary of infrastructure health."
+ type: string
+ recipients:
+ description: |-
+ The recipients of the report. Each entry is an email address, a Slack channel
+ reference in the form `slack:{team_id}.{channel_id}.{channel_name}`, or a Microsoft
+ Teams channel reference in the form `teams:{tenant_id}|{team_id}|{channel_id}`.
+ example:
+ - "user@example.com"
+ - "slack:T01234567.C01234567.alerts"
+ - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"
+ 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 dashboard or integration dashboard to render in the report.
+ example: "abc-def-ghi"
+ type: string
+ resource_type:
+ $ref: "#/components/schemas/ReportScheduleResourceType"
+ rrule:
+ description: The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string.
+ example: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0"
+ type: string
+ tab_id:
+ description: The identifier of the dashboard tab to render, when the dashboard has tabs.
+ example: "66666666-7777-8888-9999-000000000000"
+ type: string
+ template_variables:
+ description: The dashboard template variables applied when rendering the report.
+ items:
+ $ref: "#/components/schemas/ReportScheduleTemplateVariable"
+ type: array
+ timeframe:
+ description: The relative timeframe of data to include in the report (for example, `1w`).
+ example: "1w"
+ 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, between 1 and 78 characters.
+ example: "Weekly Infrastructure Report"
+ type: string
+ required:
+ - resource_id
+ - resource_type
+ - recipients
+ - rrule
+ - timezone
+ - template_variables
+ - title
+ - description
+ type: object
+ ReportScheduleCreateRequestData:
+ description: The JSON:API data object for a report schedule creation request.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/ReportScheduleCreateRequestAttributes"
+ type:
+ $ref: "#/components/schemas/ReportScheduleType"
+ required:
+ - type
+ - attributes
+ type: object
+ ReportScheduleDeliveryFormat:
+ description: |-
+ How a PDF-export report is delivered. `pdf` attaches a PDF file, `png` embeds
+ an inline PNG image, and `pdf_and_png` delivers both.
+ enum:
+ - pdf
+ - png
+ - pdf_and_png
+ example: pdf
+ type: string
+ x-enum-varnames:
+ - PDF
+ - PNG
+ - PDF_AND_PNG
+ ReportScheduleIncludedResource:
+ description: A related resource included with a report schedule.
+ oneOf:
+ - $ref: "#/components/schemas/ReportScheduleAuthor"
+ ReportSchedulePatchRequest:
+ description: Request body for updating a report schedule.
+ properties:
+ data:
+ $ref: "#/components/schemas/ReportSchedulePatchRequestData"
+ required:
+ - data
+ type: object
+ ReportSchedulePatchRequestAttributes:
+ description: |-
+ The updated configuration of the report schedule. These values replace the existing
+ ones; the targeted resource (`resource_id` and `resource_type`) cannot be changed.
+ properties:
+ delivery_format:
+ $ref: "#/components/schemas/ReportScheduleDeliveryFormat"
+ description:
+ description: A description of the report, up to 4096 characters.
+ example: "Updated weekly summary of infrastructure health."
+ maxLength: 4096
+ type: string
+ recipients:
+ description: |-
+ The recipients of the report. Each entry is an email address, a Slack channel
+ reference in the form `slack:{team_id}.{channel_id}.{channel_name}`, or a Microsoft
+ Teams channel reference in the form `teams:{tenant_id}|{team_id}|{channel_id}`.
+ example:
+ - "user@example.com"
+ - "slack:T01234567.C01234567.alerts"
+ - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"
+ items:
+ description: A single recipient (email address, Slack channel reference, or Microsoft Teams channel reference).
+ type: string
+ type: array
+ rrule:
+ description: The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string.
+ example: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0"
+ type: string
+ tab_id:
+ description: The identifier of the dashboard tab to render, when the dashboard has tabs.
+ example: "66666666-7777-8888-9999-000000000000"
+ format: uuid
+ type: string
+ template_variables:
+ description: The dashboard template variables applied when rendering the report.
+ items:
+ $ref: "#/components/schemas/ReportScheduleTemplateVariable"
+ type: array
+ timeframe:
+ description: The relative timeframe of data to include in the report (for example, `1w`).
+ example: "1w"
+ 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, between 1 and 78 characters.
+ example: "Weekly Infrastructure Report"
+ maxLength: 78
+ minLength: 1
+ type: string
+ required:
+ - recipients
+ - rrule
+ - timezone
+ - template_variables
+ - title
+ - description
+ type: object
+ ReportSchedulePatchRequestData:
+ description: The JSON:API data object for a report schedule update request.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/ReportSchedulePatchRequestAttributes"
+ type:
+ $ref: "#/components/schemas/ReportScheduleType"
+ required:
+ - type
+ - attributes
+ type: object
+ ReportScheduleResourceType:
+ description: The type of dashboard resource the report schedule targets.
+ enum:
+ - dashboard
+ - integration_dashboard
+ example: dashboard
+ type: string
+ x-enum-varnames:
+ - DASHBOARD
+ - INTEGRATION_DASHBOARD
+ ReportScheduleResponse:
+ description: Response containing a single report schedule.
+ properties:
+ data:
+ $ref: "#/components/schemas/ReportScheduleResponseData"
+ included:
+ description: Related resources included with the report schedule, such as the author.
+ items:
+ $ref: "#/components/schemas/ReportScheduleIncludedResource"
+ type: array
+ required:
+ - data
+ type: object
+ ReportScheduleResponseAttributes:
+ description: The configuration and derived state of a report schedule.
+ properties:
+ delivery_format:
+ $ref: "#/components/schemas/ReportScheduleResponseAttributesDeliveryFormat"
+ description:
+ description: The description of the report.
+ example: "Weekly summary of infrastructure health."
+ type: string
+ next_recurrence:
+ description: The Unix timestamp, in milliseconds, of the next scheduled delivery, or `null` if none is scheduled.
+ example: 1780923600000
+ format: int64
+ nullable: true
+ type: integer
+ recipients:
+ description: The recipients of the report (email addresses, Slack channel references, or Microsoft Teams channel references).
+ example:
+ - "user@example.com"
+ - "slack:T01234567.C01234567.alerts"
+ - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"
+ 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 resource rendered in the report.
+ example: "abc-def-ghi"
+ type: string
+ resource_type:
+ $ref: "#/components/schemas/ReportScheduleResourceType"
+ rrule:
+ description: The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string.
+ example: "FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0"
+ type: string
+ status:
+ $ref: "#/components/schemas/ReportScheduleStatus"
+ tab_id:
+ description: The identifier of the dashboard tab rendered in the report, or `null` if not set.
+ example: "66666666-7777-8888-9999-000000000000"
+ nullable: true
+ type: string
+ template_variables:
+ description: The dashboard template variables applied when rendering the report.
+ items:
+ $ref: "#/components/schemas/ReportScheduleTemplateVariable"
+ type: array
+ timeframe:
+ description: The relative timeframe of data included in the report, or `null` if not set.
+ example: "1w"
+ nullable: true
+ 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: "Weekly Infrastructure Report"
+ type: string
+ required:
+ - status
+ - resource_id
+ - resource_type
+ - recipients
+ - rrule
+ - timezone
+ - template_variables
+ - title
+ - description
+ - timeframe
+ - next_recurrence
+ - tab_id
+ type: object
+ ReportScheduleResponseAttributesDeliveryFormat:
+ description: The delivery format for dashboard report schedules, or `null` if not set.
+ enum:
+ - pdf
+ - png
+ - pdf_and_png
+ example: pdf
+ nullable: true
+ type: string
+ x-enum-varnames:
+ - PDF
+ - PNG
+ - PDF_AND_PNG
+ ReportScheduleResponseData:
+ description: The JSON:API data object representing a report schedule.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/ReportScheduleResponseAttributes"
+ id:
+ description: The unique identifier of the report schedule.
+ example: "11111111-2222-3333-4444-555555555555"
+ type: string
+ type:
+ $ref: "#/components/schemas/ReportScheduleType"
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ ReportScheduleStatus:
+ description: Whether the schedule is currently delivering reports (`active`) or paused (`inactive`).
+ enum:
+ - active
+ - inactive
+ example: active
+ type: string
+ x-enum-varnames:
+ - ACTIVE
+ - INACTIVE
+ ReportScheduleTemplateVariable:
+ description: A dashboard template variable applied when rendering the report.
+ properties:
+ name:
+ description: The name of the template variable.
+ example: env
+ type: string
+ values:
+ description: The selected values for the template variable.
+ example:
+ - "prod"
+ items:
+ description: A single selected template variable value.
+ type: string
+ type: array
+ required:
+ - name
+ - values
+ type: object
+ ReportScheduleType:
+ description: JSON:API resource type for report schedules.
+ enum:
+ - schedule
+ example: schedule
+ type: string
+ x-enum-varnames:
+ - SCHEDULE
ResolveVulnerableSymbolsRequest:
description: The top-level request object for resolving vulnerable symbols in a set of packages.
properties:
@@ -151378,6 +151762,211 @@ paths:
summary: Update replay heatmap snapshot
tags:
- Rum Replay Heatmaps
+ /api/v2/reporting/schedule:
+ post:
+ description: |-
+ Create a new scheduled report. A schedule renders a dashboard or integration dashboard
+ on a recurring cadence and delivers it to the configured recipients over email, Slack,
+ or Microsoft Teams.
+ Requires the `generate_dashboard_reports` permission.
+ operationId: CreateReportSchedule
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ delivery_format: pdf
+ description: "Weekly summary of infrastructure health."
+ recipients:
+ - "user@example.com"
+ - "slack:T01234567.C01234567.alerts"
+ - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"
+ resource_id: "abc-def-ghi"
+ resource_type: dashboard
+ rrule: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0"
+ template_variables:
+ - name: "env"
+ values:
+ - "prod"
+ timeframe: "1w"
+ timezone: "America/New_York"
+ title: "Weekly Infrastructure Report"
+ type: schedule
+ schema:
+ $ref: "#/components/schemas/ReportScheduleCreateRequest"
+ required: true
+ responses:
+ "201":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ delivery_format: pdf
+ description: "Weekly summary of infrastructure health."
+ next_recurrence: 1780923600000
+ recipients:
+ - "user@example.com"
+ - "slack:T01234567.C01234567.alerts"
+ - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"
+ resource_id: "abc-def-ghi"
+ resource_type: dashboard
+ rrule: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0"
+ status: active
+ tab_id: "66666666-7777-8888-9999-000000000000"
+ template_variables:
+ - name: "env"
+ values:
+ - "prod"
+ timeframe: "1w"
+ timezone: "America/New_York"
+ title: "Weekly Infrastructure Report"
+ id: "11111111-2222-3333-4444-555555555555"
+ type: schedule
+ included:
+ - attributes:
+ email: "user@example.com"
+ name: "Example User"
+ id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
+ type: users
+ schema:
+ $ref: "#/components/schemas/ReportScheduleResponse"
+ description: CREATED
+ "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: Create a report schedule
+ tags:
+ - Report Schedules
+ x-codegen-request-body-name: body
+ /api/v2/reporting/schedule/{schedule_uuid}:
+ patch:
+ description: |-
+ Update an existing scheduled report by its identifier. The editable attributes
+ are replaced with the supplied values; the targeted resource (`resource_id` and
+ `resource_type`) cannot be changed after creation.
+ Requires the `generate_dashboard_reports` permission and schedule ownership.
+ operationId: PatchReportSchedule
+ parameters:
+ - description: The unique identifier of the report schedule to update.
+ example: "11111111-2222-3333-4444-555555555555"
+ in: path
+ name: schedule_uuid
+ required: true
+ schema:
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ delivery_format: pdf
+ description: "Updated weekly summary of infrastructure health."
+ recipients:
+ - "user@example.com"
+ - "slack:T01234567.C01234567.alerts"
+ - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"
+ rrule: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0"
+ template_variables:
+ - name: "env"
+ values:
+ - "prod"
+ timeframe: "1w"
+ timezone: "America/New_York"
+ title: "Weekly Infrastructure Report"
+ type: schedule
+ schema:
+ $ref: "#/components/schemas/ReportSchedulePatchRequest"
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ delivery_format: pdf
+ description: "Updated weekly summary of infrastructure health."
+ next_recurrence: 1780923600000
+ recipients:
+ - "user@example.com"
+ - "slack:T01234567.C01234567.alerts"
+ - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"
+ resource_id: "abc-def-ghi"
+ resource_type: dashboard
+ rrule: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0"
+ status: active
+ tab_id: "66666666-7777-8888-9999-000000000000"
+ template_variables:
+ - name: "env"
+ values:
+ - "prod"
+ timeframe: "1w"
+ timezone: "America/New_York"
+ title: "Weekly Infrastructure Report"
+ id: "11111111-2222-3333-4444-555555555555"
+ type: schedule
+ included:
+ - attributes:
+ email: "user@example.com"
+ name: "Example User"
+ id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
+ type: users
+ schema:
+ $ref: "#/components/schemas/ReportScheduleResponse"
+ 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: Update a report schedule
+ tags:
+ - Report Schedules
+ x-codegen-request-body-name: body
/api/v2/restriction_policy/{resource_id}:
delete:
description: Deletes the restriction policy associated with a specified resource.
@@ -179332,6 +179921,11 @@ tags:
name: RUM Retention Filters Hardcoded
- description: View and manage Reference Tables in your organization.
name: Reference Tables
+ - description: |-
+ Create and manage scheduled reports. A scheduled report renders a dashboard or integration
+ dashboard on a recurring cadence and delivers it to a set of recipients over email, Slack,
+ or Microsoft Teams.
+ name: Report Schedules
- description: |-
A restriction policy defines the access control rules for a resource, mapping a set of relations
(such as editor and viewer) to a set of allowed principals (such as roles, teams, or users).
diff --git a/examples/v2/report-schedules/CreateReportSchedule.java b/examples/v2/report-schedules/CreateReportSchedule.java
new file mode 100644
index 00000000000..0920f558cba
--- /dev/null
+++ b/examples/v2/report-schedules/CreateReportSchedule.java
@@ -0,0 +1,64 @@
+// Create a report schedule returns "CREATED" 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.ReportScheduleCreateRequest;
+import com.datadog.api.client.v2.model.ReportScheduleCreateRequestAttributes;
+import com.datadog.api.client.v2.model.ReportScheduleCreateRequestData;
+import com.datadog.api.client.v2.model.ReportScheduleDeliveryFormat;
+import com.datadog.api.client.v2.model.ReportScheduleResourceType;
+import com.datadog.api.client.v2.model.ReportScheduleResponse;
+import com.datadog.api.client.v2.model.ReportScheduleTemplateVariable;
+import com.datadog.api.client.v2.model.ReportScheduleType;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReportSchedulesApi apiInstance = new ReportSchedulesApi(defaultClient);
+
+ ReportScheduleCreateRequest body =
+ new ReportScheduleCreateRequest()
+ .data(
+ new ReportScheduleCreateRequestData()
+ .attributes(
+ new ReportScheduleCreateRequestAttributes()
+ .deliveryFormat(ReportScheduleDeliveryFormat.PDF)
+ .description("Weekly summary of infrastructure health.")
+ .recipients(
+ Arrays.asList(
+ "user@example.com",
+ "slack:T01234567.C01234567.alerts",
+ "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"))
+ .resourceId("abc-def-ghi")
+ .resourceType(ReportScheduleResourceType.DASHBOARD)
+ .rrule(
+ """
+DTSTART;TZID=America/New_York:20260601T090000
+RRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0
+""")
+ .tabId("66666666-7777-8888-9999-000000000000")
+ .templateVariables(
+ Collections.singletonList(
+ new ReportScheduleTemplateVariable()
+ .name("env")
+ .values(Collections.singletonList("prod"))))
+ .timeframe("1w")
+ .timezone("America/New_York")
+ .title("Weekly Infrastructure Report"))
+ .type(ReportScheduleType.SCHEDULE));
+
+ try {
+ ReportScheduleResponse result = apiInstance.createReportSchedule(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReportSchedulesApi#createReportSchedule");
+ 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/PatchReportSchedule.java b/examples/v2/report-schedules/PatchReportSchedule.java
new file mode 100644
index 00000000000..b4b78204945
--- /dev/null
+++ b/examples/v2/report-schedules/PatchReportSchedule.java
@@ -0,0 +1,64 @@
+// Update a report schedule 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.ReportScheduleDeliveryFormat;
+import com.datadog.api.client.v2.model.ReportSchedulePatchRequest;
+import com.datadog.api.client.v2.model.ReportSchedulePatchRequestAttributes;
+import com.datadog.api.client.v2.model.ReportSchedulePatchRequestData;
+import com.datadog.api.client.v2.model.ReportScheduleResponse;
+import com.datadog.api.client.v2.model.ReportScheduleTemplateVariable;
+import com.datadog.api.client.v2.model.ReportScheduleType;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.UUID;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ReportSchedulesApi apiInstance = new ReportSchedulesApi(defaultClient);
+
+ ReportSchedulePatchRequest body =
+ new ReportSchedulePatchRequest()
+ .data(
+ new ReportSchedulePatchRequestData()
+ .attributes(
+ new ReportSchedulePatchRequestAttributes()
+ .deliveryFormat(ReportScheduleDeliveryFormat.PDF)
+ .description("Updated weekly summary of infrastructure health.")
+ .recipients(
+ Arrays.asList(
+ "user@example.com",
+ "slack:T01234567.C01234567.alerts",
+ "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"))
+ .rrule(
+ """
+DTSTART;TZID=America/New_York:20260601T090000
+RRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0
+""")
+ .tabId(UUID.fromString("66666666-7777-8888-9999-000000000000"))
+ .templateVariables(
+ Collections.singletonList(
+ new ReportScheduleTemplateVariable()
+ .name("env")
+ .values(Collections.singletonList("prod"))))
+ .timeframe("1w")
+ .timezone("America/New_York")
+ .title("Weekly Infrastructure Report"))
+ .type(ReportScheduleType.SCHEDULE));
+
+ try {
+ ReportScheduleResponse result =
+ apiInstance.patchReportSchedule(
+ UUID.fromString("11111111-2222-3333-4444-555555555555"), body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ReportSchedulesApi#patchReportSchedule");
+ 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
new file mode 100644
index 00000000000..64e4068a138
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/ReportSchedulesApi.java
@@ -0,0 +1,347 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+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.ReportScheduleCreateRequest;
+import com.datadog.api.client.v2.model.ReportSchedulePatchRequest;
+import com.datadog.api.client.v2.model.ReportScheduleResponse;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ReportSchedulesApi {
+ private ApiClient apiClient;
+
+ public ReportSchedulesApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public ReportSchedulesApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create a report schedule.
+ *
+ *
See {@link #createReportScheduleWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return ReportScheduleResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ReportScheduleResponse createReportSchedule(ReportScheduleCreateRequest body)
+ throws ApiException {
+ return createReportScheduleWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create a report schedule.
+ *
+ *
See {@link #createReportScheduleWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ReportScheduleResponse>
+ */
+ public CompletableFuture createReportScheduleAsync(
+ ReportScheduleCreateRequest body) {
+ return createReportScheduleWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a new scheduled report. A schedule renders a dashboard or integration dashboard on a
+ * recurring cadence and delivers it to the configured recipients over email, Slack, or Microsoft
+ * Teams. Requires the generate_dashboard_reports permission.
+ *
+ * @param body (required)
+ * @return ApiResponse<ReportScheduleResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | CREATED | - |
+ * | 400 | Bad Request | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createReportScheduleWithHttpInfo(
+ ReportScheduleCreateRequest 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 createReportSchedule");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/reporting/schedule";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReportSchedulesApi.createReportSchedule",
+ 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() {});
+ }
+
+ /**
+ * Create a report schedule.
+ *
+ * See {@link #createReportScheduleWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<ReportScheduleResponse>>
+ */
+ public CompletableFuture>
+ createReportScheduleWithHttpInfoAsync(ReportScheduleCreateRequest 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 createReportSchedule"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/reporting/schedule";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReportSchedulesApi.createReportSchedule",
+ 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() {});
+ }
+
+ /**
+ * Update a report schedule.
+ *
+ * See {@link #patchReportScheduleWithHttpInfo}.
+ *
+ * @param scheduleUuid The unique identifier of the report schedule to update. (required)
+ * @param body (required)
+ * @return ReportScheduleResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ReportScheduleResponse patchReportSchedule(
+ UUID scheduleUuid, ReportSchedulePatchRequest body) throws ApiException {
+ return patchReportScheduleWithHttpInfo(scheduleUuid, body).getData();
+ }
+
+ /**
+ * Update a report schedule.
+ *
+ *
See {@link #patchReportScheduleWithHttpInfoAsync}.
+ *
+ * @param scheduleUuid The unique identifier of the report schedule to update. (required)
+ * @param body (required)
+ * @return CompletableFuture<ReportScheduleResponse>
+ */
+ public CompletableFuture patchReportScheduleAsync(
+ UUID scheduleUuid, ReportSchedulePatchRequest body) {
+ return patchReportScheduleWithHttpInfoAsync(scheduleUuid, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update an existing scheduled report by its identifier. The editable attributes are replaced
+ * with the supplied values; the targeted resource (resource_id and
+ * resource_type) cannot be changed after creation. Requires the
+ * generate_dashboard_reports permission and schedule ownership.
+ *
+ * @param scheduleUuid The unique identifier of the report schedule to update. (required)
+ * @param body (required)
+ * @return ApiResponse<ReportScheduleResponse>
+ * @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 patchReportScheduleWithHttpInfo(
+ UUID scheduleUuid, ReportSchedulePatchRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'scheduleUuid' is set
+ if (scheduleUuid == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'scheduleUuid' when calling patchReportSchedule");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling patchReportSchedule");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reporting/schedule/{schedule_uuid}"
+ .replaceAll(
+ "\\{" + "schedule_uuid" + "\\}", apiClient.escapeString(scheduleUuid.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ReportSchedulesApi.patchReportSchedule",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a report schedule.
+ *
+ * See {@link #patchReportScheduleWithHttpInfo}.
+ *
+ * @param scheduleUuid The unique identifier of the report schedule to update. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<ReportScheduleResponse>>
+ */
+ public CompletableFuture>
+ patchReportScheduleWithHttpInfoAsync(UUID scheduleUuid, ReportSchedulePatchRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'scheduleUuid' is set
+ if (scheduleUuid == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'scheduleUuid' when calling patchReportSchedule"));
+ return result;
+ }
+
+ // 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 patchReportSchedule"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/reporting/schedule/{schedule_uuid}"
+ .replaceAll(
+ "\\{" + "schedule_uuid" + "\\}", apiClient.escapeString(scheduleUuid.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ReportSchedulesApi.patchReportSchedule",
+ 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(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthor.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthor.java
new file mode 100644
index 00000000000..8214b5bc771
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthor.java
@@ -0,0 +1,209 @@
+/*
+ * 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;
+
+/** A user included as a related JSON:API resource. */
+@JsonPropertyOrder({
+ ReportScheduleAuthor.JSON_PROPERTY_ATTRIBUTES,
+ ReportScheduleAuthor.JSON_PROPERTY_ID,
+ ReportScheduleAuthor.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ReportScheduleAuthor {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ReportScheduleAuthorAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ReportScheduleAuthorType type;
+
+ public ReportScheduleAuthor() {}
+
+ @JsonCreator
+ public ReportScheduleAuthor(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ ReportScheduleAuthorAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReportScheduleAuthorType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ReportScheduleAuthor attributes(ReportScheduleAuthorAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes of the report author.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ReportScheduleAuthorAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ReportScheduleAuthorAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ReportScheduleAuthor id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The user UUID.
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public ReportScheduleAuthor type(ReportScheduleAuthorType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * JSON:API resource type for the included report author.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ReportScheduleAuthorType getType() {
+ return type;
+ }
+
+ public void setType(ReportScheduleAuthorType 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 ReportScheduleAuthor
+ */
+ @JsonAnySetter
+ public ReportScheduleAuthor 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 ReportScheduleAuthor object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ReportScheduleAuthor reportScheduleAuthor = (ReportScheduleAuthor) o;
+ return Objects.equals(this.attributes, reportScheduleAuthor.attributes)
+ && Objects.equals(this.id, reportScheduleAuthor.id)
+ && Objects.equals(this.type, reportScheduleAuthor.type)
+ && Objects.equals(this.additionalProperties, reportScheduleAuthor.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ReportScheduleAuthor {\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/ReportScheduleAuthorAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorAttributes.java
new file mode 100644
index 00000000000..6bf698f3d63
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorAttributes.java
@@ -0,0 +1,181 @@
+/*
+ * 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;
+
+/** Attributes of the report author. */
+@JsonPropertyOrder({
+ ReportScheduleAuthorAttributes.JSON_PROPERTY_EMAIL,
+ ReportScheduleAuthorAttributes.JSON_PROPERTY_NAME
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ReportScheduleAuthorAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_EMAIL = "email";
+ private String email;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public ReportScheduleAuthorAttributes() {}
+
+ @JsonCreator
+ public ReportScheduleAuthorAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_EMAIL) String email,
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) {
+ this.email = email;
+ if (email != null) {}
+ this.name = name;
+ if (name != null) {}
+ }
+
+ public ReportScheduleAuthorAttributes email(String email) {
+ this.email = email;
+ if (email != null) {}
+ return this;
+ }
+
+ /**
+ * The email address of the report author, or null if unavailable.
+ *
+ * @return email
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_EMAIL)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public ReportScheduleAuthorAttributes name(String name) {
+ this.name = name;
+ if (name != null) {}
+ return this;
+ }
+
+ /**
+ * The display name of the report author, or null if unavailable.
+ *
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * 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 ReportScheduleAuthorAttributes
+ */
+ @JsonAnySetter
+ public ReportScheduleAuthorAttributes 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 ReportScheduleAuthorAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ReportScheduleAuthorAttributes reportScheduleAuthorAttributes =
+ (ReportScheduleAuthorAttributes) o;
+ return Objects.equals(this.email, reportScheduleAuthorAttributes.email)
+ && Objects.equals(this.name, reportScheduleAuthorAttributes.name)
+ && Objects.equals(
+ this.additionalProperties, reportScheduleAuthorAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(email, name, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ReportScheduleAuthorAttributes {\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).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/ReportScheduleAuthorType.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorType.java
new file mode 100644
index 00000000000..8ee5b985b06
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorType.java
@@ -0,0 +1,55 @@
+/*
+ * 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 the included report author. */
+@JsonSerialize(using = ReportScheduleAuthorType.ReportScheduleAuthorTypeSerializer.class)
+public class ReportScheduleAuthorType extends ModelEnum {
+
+ private static final Set allowedValues = new HashSet(Arrays.asList("users"));
+
+ public static final ReportScheduleAuthorType USERS = new ReportScheduleAuthorType("users");
+
+ ReportScheduleAuthorType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class ReportScheduleAuthorTypeSerializer
+ extends StdSerializer {
+ public ReportScheduleAuthorTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public ReportScheduleAuthorTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ReportScheduleAuthorType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static ReportScheduleAuthorType fromValue(String value) {
+ return new ReportScheduleAuthorType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequest.java
new file mode 100644
index 00000000000..4ecf483028d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequest.java
@@ -0,0 +1,147 @@
+/*
+ * 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 creating a report schedule. */
+@JsonPropertyOrder({ReportScheduleCreateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ReportScheduleCreateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private ReportScheduleCreateRequestData data;
+
+ public ReportScheduleCreateRequest() {}
+
+ @JsonCreator
+ public ReportScheduleCreateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ ReportScheduleCreateRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public ReportScheduleCreateRequest data(ReportScheduleCreateRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * The JSON:API data object for a report schedule creation request.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ReportScheduleCreateRequestData getData() {
+ return data;
+ }
+
+ public void setData(ReportScheduleCreateRequestData 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 ReportScheduleCreateRequest
+ */
+ @JsonAnySetter
+ public ReportScheduleCreateRequest 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 ReportScheduleCreateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ReportScheduleCreateRequest reportScheduleCreateRequest = (ReportScheduleCreateRequest) o;
+ return Objects.equals(this.data, reportScheduleCreateRequest.data)
+ && Objects.equals(
+ this.additionalProperties, reportScheduleCreateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ReportScheduleCreateRequest {\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/ReportScheduleCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestAttributes.java
new file mode 100644
index 00000000000..b0f8eb84e8f
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestAttributes.java
@@ -0,0 +1,471 @@
+/*
+ * 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 of the report schedule to create. */
+@JsonPropertyOrder({
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_DELIVERY_FORMAT,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_DESCRIPTION,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_RECIPIENTS,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_RESOURCE_ID,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_RESOURCE_TYPE,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_RRULE,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TAB_ID,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TEMPLATE_VARIABLES,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TIMEFRAME,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TIMEZONE,
+ ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TITLE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ReportScheduleCreateRequestAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DELIVERY_FORMAT = "delivery_format";
+ private ReportScheduleDeliveryFormat deliveryFormat;
+
+ public static final String JSON_PROPERTY_DESCRIPTION = "description";
+ private String description;
+
+ 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 ReportScheduleResourceType resourceType;
+
+ public static final String JSON_PROPERTY_RRULE = "rrule";
+ private String rrule;
+
+ public static final String JSON_PROPERTY_TAB_ID = "tab_id";
+ private String tabId;
+
+ 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_TITLE = "title";
+ private String title;
+
+ public ReportScheduleCreateRequestAttributes() {}
+
+ @JsonCreator
+ public ReportScheduleCreateRequestAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description,
+ @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)
+ ReportScheduleResourceType resourceType,
+ @JsonProperty(required = true, value = JSON_PROPERTY_RRULE) String rrule,
+ @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_TITLE) String title) {
+ this.description = description;
+ this.recipients = recipients;
+ this.resourceId = resourceId;
+ this.resourceType = resourceType;
+ this.unparsed |= !resourceType.isValid();
+ this.rrule = rrule;
+ this.templateVariables = templateVariables;
+ this.timezone = timezone;
+ this.title = title;
+ }
+
+ public ReportScheduleCreateRequestAttributes deliveryFormat(
+ ReportScheduleDeliveryFormat deliveryFormat) {
+ this.deliveryFormat = deliveryFormat;
+ this.unparsed |= !deliveryFormat.isValid();
+ return this;
+ }
+
+ /**
+ * How a PDF-export report is delivered. pdf attaches a PDF file, png
+ * embeds an inline PNG image, and pdf_and_png delivers both.
+ *
+ * @return deliveryFormat
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DELIVERY_FORMAT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ReportScheduleDeliveryFormat getDeliveryFormat() {
+ return deliveryFormat;
+ }
+
+ public void setDeliveryFormat(ReportScheduleDeliveryFormat deliveryFormat) {
+ if (!deliveryFormat.isValid()) {
+ this.unparsed = true;
+ }
+ this.deliveryFormat = deliveryFormat;
+ }
+
+ public ReportScheduleCreateRequestAttributes description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * A description of the report, up to 4096 characters.
+ *
+ * @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 ReportScheduleCreateRequestAttributes recipients(List recipients) {
+ this.recipients = recipients;
+ return this;
+ }
+
+ public ReportScheduleCreateRequestAttributes addRecipientsItem(String recipientsItem) {
+ this.recipients.add(recipientsItem);
+ return this;
+ }
+
+ /**
+ * The recipients of the report. Each entry is an email address, a Slack channel reference in the
+ * form slack:{team_id}.{channel_id}.{channel_name}, or a Microsoft Teams channel
+ * reference in the form teams:{tenant_id}|{team_id}|{channel_id}.
+ *
+ * @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 ReportScheduleCreateRequestAttributes resourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * The identifier of the dashboard or integration dashboard to render in the report.
+ *
+ * @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 ReportScheduleCreateRequestAttributes 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 ReportScheduleCreateRequestAttributes 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 ReportScheduleCreateRequestAttributes tabId(String tabId) {
+ this.tabId = tabId;
+ return this;
+ }
+
+ /**
+ * The identifier of the dashboard tab to render, when the dashboard has tabs.
+ *
+ * @return tabId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TAB_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getTabId() {
+ return tabId;
+ }
+
+ public void setTabId(String tabId) {
+ this.tabId = tabId;
+ }
+
+ public ReportScheduleCreateRequestAttributes templateVariables(
+ List templateVariables) {
+ this.templateVariables = templateVariables;
+ for (ReportScheduleTemplateVariable item : templateVariables) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public ReportScheduleCreateRequestAttributes 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 ReportScheduleCreateRequestAttributes timeframe(String timeframe) {
+ this.timeframe = timeframe;
+ return this;
+ }
+
+ /**
+ * The relative timeframe of data to include in the report (for example, 1w).
+ *
+ * @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 ReportScheduleCreateRequestAttributes 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 ReportScheduleCreateRequestAttributes title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * The title of the report, between 1 and 78 characters.
+ *
+ * @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 ReportScheduleCreateRequestAttributes
+ */
+ @JsonAnySetter
+ public ReportScheduleCreateRequestAttributes 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 ReportScheduleCreateRequestAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ReportScheduleCreateRequestAttributes reportScheduleCreateRequestAttributes =
+ (ReportScheduleCreateRequestAttributes) o;
+ return Objects.equals(this.deliveryFormat, reportScheduleCreateRequestAttributes.deliveryFormat)
+ && Objects.equals(this.description, reportScheduleCreateRequestAttributes.description)
+ && Objects.equals(this.recipients, reportScheduleCreateRequestAttributes.recipients)
+ && Objects.equals(this.resourceId, reportScheduleCreateRequestAttributes.resourceId)
+ && Objects.equals(this.resourceType, reportScheduleCreateRequestAttributes.resourceType)
+ && Objects.equals(this.rrule, reportScheduleCreateRequestAttributes.rrule)
+ && Objects.equals(this.tabId, reportScheduleCreateRequestAttributes.tabId)
+ && Objects.equals(
+ this.templateVariables, reportScheduleCreateRequestAttributes.templateVariables)
+ && Objects.equals(this.timeframe, reportScheduleCreateRequestAttributes.timeframe)
+ && Objects.equals(this.timezone, reportScheduleCreateRequestAttributes.timezone)
+ && Objects.equals(this.title, reportScheduleCreateRequestAttributes.title)
+ && Objects.equals(
+ this.additionalProperties, reportScheduleCreateRequestAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ deliveryFormat,
+ description,
+ recipients,
+ resourceId,
+ resourceType,
+ rrule,
+ tabId,
+ templateVariables,
+ timeframe,
+ timezone,
+ title,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ReportScheduleCreateRequestAttributes {\n");
+ sb.append(" deliveryFormat: ").append(toIndentedString(deliveryFormat)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).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(" tabId: ").append(toIndentedString(tabId)).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(" 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/ReportScheduleCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestData.java
new file mode 100644
index 00000000000..0331af455a2
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestData.java
@@ -0,0 +1,184 @@
+/*
+ * 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 report schedule creation request. */
+@JsonPropertyOrder({
+ ReportScheduleCreateRequestData.JSON_PROPERTY_ATTRIBUTES,
+ ReportScheduleCreateRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ReportScheduleCreateRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ReportScheduleCreateRequestAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ReportScheduleType type;
+
+ public ReportScheduleCreateRequestData() {}
+
+ @JsonCreator
+ public ReportScheduleCreateRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ ReportScheduleCreateRequestAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReportScheduleType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ReportScheduleCreateRequestData attributes(
+ ReportScheduleCreateRequestAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The configuration of the report schedule to create.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ReportScheduleCreateRequestAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ReportScheduleCreateRequestAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ReportScheduleCreateRequestData 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 ReportScheduleCreateRequestData
+ */
+ @JsonAnySetter
+ public ReportScheduleCreateRequestData 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 ReportScheduleCreateRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ReportScheduleCreateRequestData reportScheduleCreateRequestData =
+ (ReportScheduleCreateRequestData) o;
+ return Objects.equals(this.attributes, reportScheduleCreateRequestData.attributes)
+ && Objects.equals(this.type, reportScheduleCreateRequestData.type)
+ && Objects.equals(
+ this.additionalProperties, reportScheduleCreateRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ReportScheduleCreateRequestData {\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/ReportScheduleDeliveryFormat.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleDeliveryFormat.java
new file mode 100644
index 00000000000..67177e49314
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleDeliveryFormat.java
@@ -0,0 +1,62 @@
+/*
+ * 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;
+
+/**
+ * How a PDF-export report is delivered. pdf attaches a PDF file, png
+ * embeds an inline PNG image, and pdf_and_png delivers both.
+ */
+@JsonSerialize(using = ReportScheduleDeliveryFormat.ReportScheduleDeliveryFormatSerializer.class)
+public class ReportScheduleDeliveryFormat extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("pdf", "png", "pdf_and_png"));
+
+ public static final ReportScheduleDeliveryFormat PDF = new ReportScheduleDeliveryFormat("pdf");
+ public static final ReportScheduleDeliveryFormat PNG = new ReportScheduleDeliveryFormat("png");
+ public static final ReportScheduleDeliveryFormat PDF_AND_PNG =
+ new ReportScheduleDeliveryFormat("pdf_and_png");
+
+ ReportScheduleDeliveryFormat(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class ReportScheduleDeliveryFormatSerializer
+ extends StdSerializer {
+ public ReportScheduleDeliveryFormatSerializer(Class t) {
+ super(t);
+ }
+
+ public ReportScheduleDeliveryFormatSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ReportScheduleDeliveryFormat value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static ReportScheduleDeliveryFormat fromValue(String value) {
+ return new ReportScheduleDeliveryFormat(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleIncludedResource.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleIncludedResource.java
new file mode 100644
index 00000000000..aa0de0fcb67
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleIncludedResource.java
@@ -0,0 +1,218 @@
+/*
+ * 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.AbstractOpenApiSchema;
+import com.datadog.api.client.JSON;
+import com.datadog.api.client.UnparsedObject;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import jakarta.ws.rs.core.GenericType;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+@JsonDeserialize(
+ using = ReportScheduleIncludedResource.ReportScheduleIncludedResourceDeserializer.class)
+@JsonSerialize(
+ using = ReportScheduleIncludedResource.ReportScheduleIncludedResourceSerializer.class)
+public class ReportScheduleIncludedResource extends AbstractOpenApiSchema {
+ private static final Logger log =
+ Logger.getLogger(ReportScheduleIncludedResource.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class ReportScheduleIncludedResourceSerializer
+ extends StdSerializer {
+ public ReportScheduleIncludedResourceSerializer(Class t) {
+ super(t);
+ }
+
+ public ReportScheduleIncludedResourceSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ReportScheduleIncludedResource value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class ReportScheduleIncludedResourceDeserializer
+ extends StdDeserializer {
+ public ReportScheduleIncludedResourceDeserializer() {
+ this(ReportScheduleIncludedResource.class);
+ }
+
+ public ReportScheduleIncludedResourceDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public ReportScheduleIncludedResource deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+ JsonNode tree = jp.readValueAsTree();
+ Object deserialized = null;
+ Object tmp = null;
+ boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
+ int match = 0;
+ JsonToken token = tree.traverse(jp.getCodec()).nextToken();
+ // deserialize ReportScheduleAuthor
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (ReportScheduleAuthor.class.equals(Integer.class)
+ || ReportScheduleAuthor.class.equals(Long.class)
+ || ReportScheduleAuthor.class.equals(Float.class)
+ || ReportScheduleAuthor.class.equals(Double.class)
+ || ReportScheduleAuthor.class.equals(Boolean.class)
+ || ReportScheduleAuthor.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((ReportScheduleAuthor.class.equals(Integer.class)
+ || ReportScheduleAuthor.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((ReportScheduleAuthor.class.equals(Float.class)
+ || ReportScheduleAuthor.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (ReportScheduleAuthor.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (ReportScheduleAuthor.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(ReportScheduleAuthor.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((ReportScheduleAuthor) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'ReportScheduleAuthor'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'ReportScheduleAuthor'", e);
+ }
+
+ ReportScheduleIncludedResource ret = new ReportScheduleIncludedResource();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference