diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c1d320d57f4..6c6c8ffa8f6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -28083,6 +28083,38 @@ components: type: string x-enum-varnames: - CREATE_SNAPSHOT + CreateStatusPageEmailAccessPolicyRequest: + description: Request object for creating a status page email access policy. + properties: + data: + $ref: "#/components/schemas/CreateStatusPageEmailAccessPolicyRequestData" + required: + - data + type: object + CreateStatusPageEmailAccessPolicyRequestData: + description: The data object for creating a status page email access policy. + properties: + attributes: + $ref: "#/components/schemas/CreateStatusPageEmailAccessPolicyRequestDataAttributes" + type: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyType" + required: + - attributes + - type + type: object + CreateStatusPageEmailAccessPolicyRequestDataAttributes: + description: Attributes for creating a status page email access policy. + properties: + effect: + $ref: "#/components/schemas/ExecutionPolicyEffect" + pattern: + description: The email address pattern matched by the policy. Supports an exact address (`user@example.com`), all addresses in a domain (`@example.com`), or all addresses in subdomains (`@*.example.com`). + example: "@example.com" + type: string + required: + - effect + - pattern + type: object CreateStatusPageRequest: description: Request object for creating a status page. example: @@ -28159,7 +28191,7 @@ components: $ref: "#/components/schemas/CreateStatusPageRequestDataAttributesComponentsItems" type: array domain_prefix: - description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + description: The subdomain of the status page URL. Public pages use `https://{domain_prefix}.statuspage.datadoghq.com`, while private pages use `https://{domain_prefix}.private.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. example: status-page-us1 type: string email_header_image: @@ -28248,15 +28280,17 @@ components: $ref: "#/components/schemas/StatusPagesComponentGroupAttributesComponentsItemsType" type: object CreateStatusPageRequestDataAttributesType: - description: The type of the status page controlling how the status page is accessed. + description: The type of the status page controlling how the status page is accessed. Public pages are accessible to anyone, internal pages are accessible to authenticated users in the Datadog organization, and private pages are accessible only to users matching an allow email access policy and no deny email access policy. enum: - public - internal + - private example: public type: string x-enum-varnames: - PUBLIC - INTERNAL + - PRIVATE CreateStatusPageRequestDataAttributesVisualizationLayout: description: The layout of components on the status page. Defaults to `list`. `grid` requires `visualization_type` to be `component_name_only`; changing `visualization_type` to any other value resets the layout to `list`. enum: @@ -98789,7 +98823,7 @@ components: example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAIKMMMM type: string domain_prefix: - description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + description: The subdomain of the status page URL. Public pages use `https://{domain_prefix}.statuspage.datadoghq.com`, while private pages use `https://{domain_prefix}.private.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. example: status-page-us1 type: string email_header_image: @@ -129114,7 +129148,7 @@ components: description: Whether the custom domain is configured. type: boolean domain_prefix: - description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + description: The subdomain of the status page URL. Public pages use `https://{domain_prefix}.statuspage.datadoghq.com`, while private pages use `https://{domain_prefix}.private.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. type: string email_header_image: description: Base64-encoded image data included in email notifications sent to status page subscribers. @@ -129291,7 +129325,7 @@ components: description: Whether the custom domain is configured. type: boolean domain_prefix: - description: The subdomain of the status page's url taking the form `https://{domain_prefix}.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. + description: The subdomain of the status page URL. Public pages use `https://{domain_prefix}.statuspage.datadoghq.com`, while private pages use `https://{domain_prefix}.private.statuspage.datadoghq.com`. Globally unique across Datadog Status Pages. type: string email_header_image: description: Base64-encoded image data included in email notifications sent to status page subscribers. @@ -129437,6 +129471,143 @@ components: type: string x-enum-varnames: - STATUS_PAGES + StatusPageEmailAccessPolicyArrayResponse: + description: Response object for a list of status page email access policies. + properties: + data: + description: A list of status page email access policy data objects. + items: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyData" + type: array + included: + description: Resources related to the email access policies, when requested using the `include` query parameter. + items: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyIncluded" + type: array + required: + - data + type: object + StatusPageEmailAccessPolicyData: + description: The data object for a status page email access policy. + properties: + attributes: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataAttributes" + id: + description: The ID of the email access policy. + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + relationships: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationships" + type: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyType" + required: + - attributes + - id + - relationships + - type + type: object + StatusPageEmailAccessPolicyDataAttributes: + description: Attributes of a status page email access policy. + properties: + created_at: + description: Timestamp of when the email access policy was created. + example: "2026-01-01T00:00:00.000Z" + format: date-time + type: string + effect: + $ref: "#/components/schemas/ExecutionPolicyEffect" + pattern: + description: The email address pattern matched by the policy. + example: "@example.com" + type: string + required: + - created_at + - effect + - pattern + type: object + StatusPageEmailAccessPolicyDataRelationships: + description: Relationships of a status page email access policy. + properties: + created_by_user: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser" + status_page: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationshipsStatusPage" + required: + - created_by_user + - status_page + type: object + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser: + description: The Datadog user who created the email access policy. + properties: + data: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData" + required: + - data + type: object + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData: + description: The data object identifying the Datadog user who created the email access policy. + properties: + id: + description: The ID of the Datadog user who created the email access policy. + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + type: + $ref: "#/components/schemas/StatusPagesUserType" + required: + - id + - type + type: object + StatusPageEmailAccessPolicyDataRelationshipsStatusPage: + description: The status page associated with the email access policy. + properties: + data: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyDataRelationshipsStatusPageData" + required: + - data + type: object + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData: + description: The data object identifying the status page associated with the email access policy. + properties: + id: + description: The ID of the status page associated with the email access policy. + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + type: + $ref: "#/components/schemas/StatusPageDataType" + required: + - id + - type + type: object + StatusPageEmailAccessPolicyIncluded: + description: An included resource related to a status page email access policy. + oneOf: + - $ref: "#/components/schemas/StatusPagesUser" + - $ref: "#/components/schemas/StatusPageAsIncluded" + StatusPageEmailAccessPolicyResponse: + description: Response object for a status page email access policy. + properties: + data: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyData" + included: + description: Resources related to the email access policy, when requested using the `include` query parameter. + items: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyIncluded" + type: array + required: + - data + type: object + StatusPageEmailAccessPolicyType: + default: email_access_policies + description: Status page email access policy resource type. + enum: + - email_access_policies + example: email_access_policies + type: string + x-enum-varnames: + - EMAIL_ACCESS_POLICIES StatusPagesComponent: description: Response object for a single component. properties: @@ -247861,6 +248032,233 @@ paths: operator: AND permissions: - status_pages_settings_write + /api/v2/statuspages/{page_id}/access_policies/email: + get: + description: Lists the email access policies for a private status page. + operationId: ListEmailAccessPolicies + parameters: + - description: The ID of the private status page. + in: path + name: page_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: "Comma-separated list of resources to include. Supported values: created_by_user, status_page." + in: query + name: include + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2026-01-01T00:00:00.000Z" + effect: allow + pattern: "@example.com" + id: 00000000-0000-0000-0000-000000000001 + relationships: + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000003 + type: users + status_page: + data: + id: 00000000-0000-0000-0000-000000000002 + type: status_pages + type: email_access_policies + schema: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyArrayResponse" + 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" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - status_pages_settings_read + summary: List email access policies + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_read + post: + description: Creates an email access policy for a private status page. + operationId: CreateEmailAccessPolicy + parameters: + - description: The ID of the private status page. + in: path + name: page_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: "Comma-separated list of resources to include. Supported values: created_by_user, status_page." + in: query + name: include + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + effect: allow + pattern: "@example.com" + type: email_access_policies + schema: + $ref: "#/components/schemas/CreateStatusPageEmailAccessPolicyRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-01-01T00:00:00.000Z" + effect: allow + pattern: "@example.com" + id: 00000000-0000-0000-0000-000000000001 + relationships: + created_by_user: + data: + id: 00000000-0000-0000-0000-000000000003 + type: users + status_page: + data: + id: 00000000-0000-0000-0000-000000000002 + type: status_pages + type: email_access_policies + schema: + $ref: "#/components/schemas/StatusPageEmailAccessPolicyResponse" + 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 + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - status_pages_settings_write + summary: Create an email access policy + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write + /api/v2/statuspages/{page_id}/access_policies/email/{policy_id}: + delete: + description: Deletes an email access policy from a private status page. + operationId: DeleteEmailAccessPolicy + parameters: + - description: The ID of the private status page. + in: path + name: page_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + - description: The ID of the email access policy. + in: path + name: policy_id + required: true + schema: + example: 1234abcd-12ab-34cd-56ef-123456abcdef + format: uuid + type: string + responses: + "204": + description: No Content + "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" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - status_pages_settings_write + summary: Delete an email access policy + tags: + - Status Pages + x-permission: + operator: AND + permissions: + - status_pages_settings_write /api/v2/statuspages/{page_id}/components: get: description: Lists all components for a status page. @@ -249525,7 +249923,7 @@ paths: - status_pages_incident_write /api/v2/statuspages/{page_id}/publish: post: - description: Publishes a status page. For pages of type `public`, makes the status page available on the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, makes the status page available under the `status-pages/$domain_prefix/view` route within the Datadog organization and requires the `status_pages_internal_page_publish` permission. + description: Publishes a status page. For pages of type `public`, makes the status page available on the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, makes the status page available under the `status-pages/$domain_prefix/view` route within the Datadog organization and requires the `status_pages_internal_page_publish` permission. For pages of type `private`, makes the status page available to users authorized by its email access policies and requires the `status_pages_private_page_publish` permission. A private status page must have at least one email access policy before it can be published. operationId: PublishStatusPage parameters: - description: The ID of the status page. @@ -249545,6 +249943,7 @@ paths: appKeyAuth: [] - AuthZ: - status_pages_internal_page_publish + - status_pages_private_page_publish - status_pages_public_page_publish summary: Publish status page tags: @@ -249554,9 +249953,10 @@ paths: permissions: - status_pages_public_page_publish - status_pages_internal_page_publish + - status_pages_private_page_publish /api/v2/statuspages/{page_id}/unpublish: post: - description: Unpublishes a status page. For pages of type `public`, removes the status page from the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, removes the `status-pages/$domain_prefix/view` route from the Datadog organization and requires the `status_pages_internal_page_publish` permission. + description: Unpublishes a status page. For pages of type `public`, removes the status page from the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, removes the `status-pages/$domain_prefix/view` route from the Datadog organization and requires the `status_pages_internal_page_publish` permission. For pages of type `private`, removes access to the private status page and requires the `status_pages_private_page_publish` permission. operationId: UnpublishStatusPage parameters: - description: The ID of the status page. @@ -249576,6 +249976,7 @@ paths: appKeyAuth: [] - AuthZ: - status_pages_internal_page_publish + - status_pages_private_page_publish - status_pages_public_page_publish summary: Unpublish status page tags: @@ -249585,6 +249986,7 @@ paths: permissions: - status_pages_public_page_publish - status_pages_internal_page_publish + - status_pages_private_page_publish /api/v2/stegadography/get-widgets: post: description: |- diff --git a/examples/v2/status-pages/CreateEmailAccessPolicy.java b/examples/v2/status-pages/CreateEmailAccessPolicy.java new file mode 100644 index 00000000000..a3ad62deffd --- /dev/null +++ b/examples/v2/status-pages/CreateEmailAccessPolicy.java @@ -0,0 +1,43 @@ +// Create an email access policy returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StatusPagesApi; +import com.datadog.api.client.v2.model.CreateStatusPageEmailAccessPolicyRequest; +import com.datadog.api.client.v2.model.CreateStatusPageEmailAccessPolicyRequestData; +import com.datadog.api.client.v2.model.CreateStatusPageEmailAccessPolicyRequestDataAttributes; +import com.datadog.api.client.v2.model.ExecutionPolicyEffect; +import com.datadog.api.client.v2.model.StatusPageEmailAccessPolicyResponse; +import com.datadog.api.client.v2.model.StatusPageEmailAccessPolicyType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + StatusPagesApi apiInstance = new StatusPagesApi(defaultClient); + + CreateStatusPageEmailAccessPolicyRequest body = + new CreateStatusPageEmailAccessPolicyRequest() + .data( + new CreateStatusPageEmailAccessPolicyRequestData() + .attributes( + new CreateStatusPageEmailAccessPolicyRequestDataAttributes() + .effect(ExecutionPolicyEffect.ALLOW) + .pattern("@example.com")) + .type(StatusPageEmailAccessPolicyType.EMAIL_ACCESS_POLICIES)); + + try { + StatusPageEmailAccessPolicyResponse result = + apiInstance.createEmailAccessPolicy( + UUID.fromString("1234abcd-12ab-34cd-56ef-123456abcdef"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#createEmailAccessPolicy"); + 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/status-pages/DeleteEmailAccessPolicy.java b/examples/v2/status-pages/DeleteEmailAccessPolicy.java new file mode 100644 index 00000000000..a2a23e9d80e --- /dev/null +++ b/examples/v2/status-pages/DeleteEmailAccessPolicy.java @@ -0,0 +1,26 @@ +// Delete an email access policy returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StatusPagesApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + StatusPagesApi apiInstance = new StatusPagesApi(defaultClient); + + try { + apiInstance.deleteEmailAccessPolicy( + UUID.fromString("1234abcd-12ab-34cd-56ef-123456abcdef"), + UUID.fromString("1234abcd-12ab-34cd-56ef-123456abcdef")); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#deleteEmailAccessPolicy"); + 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/status-pages/ListEmailAccessPolicies.java b/examples/v2/status-pages/ListEmailAccessPolicies.java new file mode 100644 index 00000000000..09a33157eb3 --- /dev/null +++ b/examples/v2/status-pages/ListEmailAccessPolicies.java @@ -0,0 +1,28 @@ +// List email access policies returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StatusPagesApi; +import com.datadog.api.client.v2.model.StatusPageEmailAccessPolicyArrayResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + StatusPagesApi apiInstance = new StatusPagesApi(defaultClient); + + try { + StatusPageEmailAccessPolicyArrayResponse result = + apiInstance.listEmailAccessPolicies( + UUID.fromString("1234abcd-12ab-34cd-56ef-123456abcdef")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StatusPagesApi#listEmailAccessPolicies"); + 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/StatusPagesApi.java b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java index 6906f674ff9..15d16f14daf 100644 --- a/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java @@ -11,6 +11,7 @@ import com.datadog.api.client.v2.model.CreateDegradationTemplateRequest; import com.datadog.api.client.v2.model.CreateMaintenanceRequest; import com.datadog.api.client.v2.model.CreateMaintenanceTemplateRequest; +import com.datadog.api.client.v2.model.CreateStatusPageEmailAccessPolicyRequest; import com.datadog.api.client.v2.model.CreateStatusPageRequest; import com.datadog.api.client.v2.model.Degradation; import com.datadog.api.client.v2.model.DegradationArray; @@ -32,6 +33,8 @@ import com.datadog.api.client.v2.model.PatchStatusPageRequest; import com.datadog.api.client.v2.model.StatusPage; import com.datadog.api.client.v2.model.StatusPageArray; +import com.datadog.api.client.v2.model.StatusPageEmailAccessPolicyArrayResponse; +import com.datadog.api.client.v2.model.StatusPageEmailAccessPolicyResponse; import com.datadog.api.client.v2.model.StatusPagesComponent; import com.datadog.api.client.v2.model.StatusPagesComponentArray; import jakarta.ws.rs.client.Invocation; @@ -1225,6 +1228,243 @@ public ApiResponse createDegradationTemplateWithHttpInfo( new GenericType() {}); } + /** Manage optional parameters to createEmailAccessPolicy. */ + public static class CreateEmailAccessPolicyOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of resources to include. Supported values: + * created_by_user, status_page. (optional) + * @return CreateEmailAccessPolicyOptionalParameters + */ + public CreateEmailAccessPolicyOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * Create an email access policy. + * + *

See {@link #createEmailAccessPolicyWithHttpInfo}. + * + * @param pageId The ID of the private status page. (required) + * @param body (required) + * @return StatusPageEmailAccessPolicyResponse + * @throws ApiException if fails to make API call + */ + public StatusPageEmailAccessPolicyResponse createEmailAccessPolicy( + UUID pageId, CreateStatusPageEmailAccessPolicyRequest body) throws ApiException { + return createEmailAccessPolicyWithHttpInfo( + pageId, body, new CreateEmailAccessPolicyOptionalParameters()) + .getData(); + } + + /** + * Create an email access policy. + * + *

See {@link #createEmailAccessPolicyWithHttpInfoAsync}. + * + * @param pageId The ID of the private status page. (required) + * @param body (required) + * @return CompletableFuture<StatusPageEmailAccessPolicyResponse> + */ + public CompletableFuture createEmailAccessPolicyAsync( + UUID pageId, CreateStatusPageEmailAccessPolicyRequest body) { + return createEmailAccessPolicyWithHttpInfoAsync( + pageId, body, new CreateEmailAccessPolicyOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an email access policy. + * + *

See {@link #createEmailAccessPolicyWithHttpInfo}. + * + * @param pageId The ID of the private status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return StatusPageEmailAccessPolicyResponse + * @throws ApiException if fails to make API call + */ + public StatusPageEmailAccessPolicyResponse createEmailAccessPolicy( + UUID pageId, + CreateStatusPageEmailAccessPolicyRequest body, + CreateEmailAccessPolicyOptionalParameters parameters) + throws ApiException { + return createEmailAccessPolicyWithHttpInfo(pageId, body, parameters).getData(); + } + + /** + * Create an email access policy. + * + *

See {@link #createEmailAccessPolicyWithHttpInfoAsync}. + * + * @param pageId The ID of the private status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPageEmailAccessPolicyResponse> + */ + public CompletableFuture createEmailAccessPolicyAsync( + UUID pageId, + CreateStatusPageEmailAccessPolicyRequest body, + CreateEmailAccessPolicyOptionalParameters parameters) { + return createEmailAccessPolicyWithHttpInfoAsync(pageId, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Creates an email access policy for a private status page. + * + * @param pageId The ID of the private status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<StatusPageEmailAccessPolicyResponse> + * @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 -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createEmailAccessPolicyWithHttpInfo( + UUID pageId, + CreateStatusPageEmailAccessPolicyRequest body, + CreateEmailAccessPolicyOptionalParameters parameters) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'pageId' is set + if (pageId == null) { + throw new ApiException( + 400, "Missing the required parameter 'pageId' when calling createEmailAccessPolicy"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createEmailAccessPolicy"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/access_policies/email" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.createEmailAccessPolicy", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an email access policy. + * + *

See {@link #createEmailAccessPolicyWithHttpInfo}. + * + * @param pageId The ID of the private status page. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPageEmailAccessPolicyResponse>> + */ + public CompletableFuture> + createEmailAccessPolicyWithHttpInfoAsync( + UUID pageId, + CreateStatusPageEmailAccessPolicyRequest body, + CreateEmailAccessPolicyOptionalParameters parameters) { + Object localVarPostBody = body; + + // verify the required parameter 'pageId' is set + if (pageId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'pageId' when calling createEmailAccessPolicy")); + 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 createEmailAccessPolicy")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/access_policies/email" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.createEmailAccessPolicy", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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() {}); + } + /** Manage optional parameters to createMaintenance. */ public static class CreateMaintenanceOptionalParameters { private Boolean notifySubscribers; @@ -2358,6 +2598,163 @@ public CompletableFuture> deleteDegradationTemplateWithHttpInf null); } + /** + * Delete an email access policy. + * + *

See {@link #deleteEmailAccessPolicyWithHttpInfo}. + * + * @param pageId The ID of the private status page. (required) + * @param policyId The ID of the email access policy. (required) + * @throws ApiException if fails to make API call + */ + public void deleteEmailAccessPolicy(UUID pageId, UUID policyId) throws ApiException { + deleteEmailAccessPolicyWithHttpInfo(pageId, policyId); + } + + /** + * Delete an email access policy. + * + *

See {@link #deleteEmailAccessPolicyWithHttpInfoAsync}. + * + * @param pageId The ID of the private status page. (required) + * @param policyId The ID of the email access policy. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteEmailAccessPolicyAsync(UUID pageId, UUID policyId) { + return deleteEmailAccessPolicyWithHttpInfoAsync(pageId, policyId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Deletes an email access policy from a private status page. + * + * @param pageId The ID of the private status page. (required) + * @param policyId The ID of the email access policy. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteEmailAccessPolicyWithHttpInfo(UUID pageId, UUID policyId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'pageId' is set + if (pageId == null) { + throw new ApiException( + 400, "Missing the required parameter 'pageId' when calling deleteEmailAccessPolicy"); + } + + // verify the required parameter 'policyId' is set + if (policyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'policyId' when calling deleteEmailAccessPolicy"); + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/access_policies/email/{policy_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.deleteEmailAccessPolicy", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an email access policy. + * + *

See {@link #deleteEmailAccessPolicyWithHttpInfo}. + * + * @param pageId The ID of the private status page. (required) + * @param policyId The ID of the email access policy. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteEmailAccessPolicyWithHttpInfoAsync( + UUID pageId, UUID policyId) { + Object localVarPostBody = null; + + // verify the required parameter 'pageId' is set + if (pageId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'pageId' when calling deleteEmailAccessPolicy")); + return result; + } + + // verify the required parameter 'policyId' is set + if (policyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'policyId' when calling deleteEmailAccessPolicy")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/access_policies/email/{policy_id}" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())) + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.deleteEmailAccessPolicy", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + /** * Delete maintenance template. * @@ -4905,6 +5302,210 @@ public ApiResponse listDegradationTemplatesWithHttpInf new GenericType() {}); } + /** Manage optional parameters to listEmailAccessPolicies. */ + public static class ListEmailAccessPoliciesOptionalParameters { + private String include; + + /** + * Set include. + * + * @param include Comma-separated list of resources to include. Supported values: + * created_by_user, status_page. (optional) + * @return ListEmailAccessPoliciesOptionalParameters + */ + public ListEmailAccessPoliciesOptionalParameters include(String include) { + this.include = include; + return this; + } + } + + /** + * List email access policies. + * + *

See {@link #listEmailAccessPoliciesWithHttpInfo}. + * + * @param pageId The ID of the private status page. (required) + * @return StatusPageEmailAccessPolicyArrayResponse + * @throws ApiException if fails to make API call + */ + public StatusPageEmailAccessPolicyArrayResponse listEmailAccessPolicies(UUID pageId) + throws ApiException { + return listEmailAccessPoliciesWithHttpInfo( + pageId, new ListEmailAccessPoliciesOptionalParameters()) + .getData(); + } + + /** + * List email access policies. + * + *

See {@link #listEmailAccessPoliciesWithHttpInfoAsync}. + * + * @param pageId The ID of the private status page. (required) + * @return CompletableFuture<StatusPageEmailAccessPolicyArrayResponse> + */ + public CompletableFuture listEmailAccessPoliciesAsync( + UUID pageId) { + return listEmailAccessPoliciesWithHttpInfoAsync( + pageId, new ListEmailAccessPoliciesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List email access policies. + * + *

See {@link #listEmailAccessPoliciesWithHttpInfo}. + * + * @param pageId The ID of the private status page. (required) + * @param parameters Optional parameters for the request. + * @return StatusPageEmailAccessPolicyArrayResponse + * @throws ApiException if fails to make API call + */ + public StatusPageEmailAccessPolicyArrayResponse listEmailAccessPolicies( + UUID pageId, ListEmailAccessPoliciesOptionalParameters parameters) throws ApiException { + return listEmailAccessPoliciesWithHttpInfo(pageId, parameters).getData(); + } + + /** + * List email access policies. + * + *

See {@link #listEmailAccessPoliciesWithHttpInfoAsync}. + * + * @param pageId The ID of the private status page. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<StatusPageEmailAccessPolicyArrayResponse> + */ + public CompletableFuture listEmailAccessPoliciesAsync( + UUID pageId, ListEmailAccessPoliciesOptionalParameters parameters) { + return listEmailAccessPoliciesWithHttpInfoAsync(pageId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Lists the email access policies for a private status page. + * + * @param pageId The ID of the private status page. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<StatusPageEmailAccessPolicyArrayResponse> + * @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 listEmailAccessPoliciesWithHttpInfo( + UUID pageId, ListEmailAccessPoliciesOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'pageId' is set + if (pageId == null) { + throw new ApiException( + 400, "Missing the required parameter 'pageId' when calling listEmailAccessPolicies"); + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/access_policies/email" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StatusPagesApi.listEmailAccessPolicies", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List email access policies. + * + *

See {@link #listEmailAccessPoliciesWithHttpInfo}. + * + * @param pageId The ID of the private status page. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<StatusPageEmailAccessPolicyArrayResponse>> + */ + public CompletableFuture> + listEmailAccessPoliciesWithHttpInfoAsync( + UUID pageId, ListEmailAccessPoliciesOptionalParameters parameters) { + Object localVarPostBody = null; + + // verify the required parameter 'pageId' is set + if (pageId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'pageId' when calling listEmailAccessPolicies")); + return result; + } + String include = parameters.include; + // create path and map variables + String localVarPath = + "/api/v2/statuspages/{page_id}/access_policies/email" + .replaceAll("\\{" + "page_id" + "\\}", apiClient.escapeString(pageId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StatusPagesApi.listEmailAccessPolicies", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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 listMaintenances. */ public static class ListMaintenancesOptionalParameters { private String filterPageId; @@ -5827,7 +6428,10 @@ public CompletableFuture publishStatusPageAsync(UUID pageId) { * on the public internet and requires the status_pages_public_page_publish * permission. For pages of type internal, makes the status page available under the * status-pages/$domain_prefix/view route within the Datadog organization and - * requires the status_pages_internal_page_publish permission. + * requires the status_pages_internal_page_publish permission. For pages of type + * private, makes the status page available to users authorized by its email access + * policies and requires the status_pages_private_page_publish permission. A private + * status page must have at least one email access policy before it can be published. * * @param pageId The ID of the status page. (required) * @return ApiResponse<Void> @@ -6147,7 +6751,9 @@ public CompletableFuture unpublishStatusPageAsync(UUID pageId) { * the public internet and requires the status_pages_public_page_publish permission. * For pages of type internal, removes the status-pages/$domain_prefix/view * route from the Datadog organization and requires the - * status_pages_internal_page_publish permission. + * status_pages_internal_page_publish permission. For pages of type private, + * removes access to the private status page and requires the + * status_pages_private_page_publish permission. * * @param pageId The ID of the status page. (required) * @return ApiResponse<Void> diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageEmailAccessPolicyRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageEmailAccessPolicyRequest.java new file mode 100644 index 00000000000..8478228e827 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageEmailAccessPolicyRequest.java @@ -0,0 +1,153 @@ +/* + * 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 object for creating a status page email access policy. */ +@JsonPropertyOrder({CreateStatusPageEmailAccessPolicyRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateStatusPageEmailAccessPolicyRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateStatusPageEmailAccessPolicyRequestData data; + + public CreateStatusPageEmailAccessPolicyRequest() {} + + @JsonCreator + public CreateStatusPageEmailAccessPolicyRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + CreateStatusPageEmailAccessPolicyRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CreateStatusPageEmailAccessPolicyRequest data( + CreateStatusPageEmailAccessPolicyRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object for creating a status page email access policy. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateStatusPageEmailAccessPolicyRequestData getData() { + return data; + } + + public void setData(CreateStatusPageEmailAccessPolicyRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 CreateStatusPageEmailAccessPolicyRequest + */ + @JsonAnySetter + public CreateStatusPageEmailAccessPolicyRequest 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 CreateStatusPageEmailAccessPolicyRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStatusPageEmailAccessPolicyRequest createStatusPageEmailAccessPolicyRequest = + (CreateStatusPageEmailAccessPolicyRequest) o; + return Objects.equals(this.data, createStatusPageEmailAccessPolicyRequest.data) + && Objects.equals( + this.additionalProperties, + createStatusPageEmailAccessPolicyRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStatusPageEmailAccessPolicyRequest {\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/CreateStatusPageEmailAccessPolicyRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageEmailAccessPolicyRequestData.java new file mode 100644 index 00000000000..a67a28b54f0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageEmailAccessPolicyRequestData.java @@ -0,0 +1,191 @@ +/* + * 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 data object for creating a status page email access policy. */ +@JsonPropertyOrder({ + CreateStatusPageEmailAccessPolicyRequestData.JSON_PROPERTY_ATTRIBUTES, + CreateStatusPageEmailAccessPolicyRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateStatusPageEmailAccessPolicyRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateStatusPageEmailAccessPolicyRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageEmailAccessPolicyType type = + StatusPageEmailAccessPolicyType.EMAIL_ACCESS_POLICIES; + + public CreateStatusPageEmailAccessPolicyRequestData() {} + + @JsonCreator + public CreateStatusPageEmailAccessPolicyRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CreateStatusPageEmailAccessPolicyRequestDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPageEmailAccessPolicyType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateStatusPageEmailAccessPolicyRequestData attributes( + CreateStatusPageEmailAccessPolicyRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a status page email access policy. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateStatusPageEmailAccessPolicyRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateStatusPageEmailAccessPolicyRequestDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public CreateStatusPageEmailAccessPolicyRequestData type(StatusPageEmailAccessPolicyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status page email access policy resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyType getType() { + return type; + } + + public void setType(StatusPageEmailAccessPolicyType 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 CreateStatusPageEmailAccessPolicyRequestData + */ + @JsonAnySetter + public CreateStatusPageEmailAccessPolicyRequestData 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 CreateStatusPageEmailAccessPolicyRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStatusPageEmailAccessPolicyRequestData createStatusPageEmailAccessPolicyRequestData = + (CreateStatusPageEmailAccessPolicyRequestData) o; + return Objects.equals(this.attributes, createStatusPageEmailAccessPolicyRequestData.attributes) + && Objects.equals(this.type, createStatusPageEmailAccessPolicyRequestData.type) + && Objects.equals( + this.additionalProperties, + createStatusPageEmailAccessPolicyRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStatusPageEmailAccessPolicyRequestData {\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/CreateStatusPageEmailAccessPolicyRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageEmailAccessPolicyRequestDataAttributes.java new file mode 100644 index 00000000000..d7f353200ff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageEmailAccessPolicyRequestDataAttributes.java @@ -0,0 +1,191 @@ +/* + * 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 for creating a status page email access policy. */ +@JsonPropertyOrder({ + CreateStatusPageEmailAccessPolicyRequestDataAttributes.JSON_PROPERTY_EFFECT, + CreateStatusPageEmailAccessPolicyRequestDataAttributes.JSON_PROPERTY_PATTERN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateStatusPageEmailAccessPolicyRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EFFECT = "effect"; + private ExecutionPolicyEffect effect; + + public static final String JSON_PROPERTY_PATTERN = "pattern"; + private String pattern; + + public CreateStatusPageEmailAccessPolicyRequestDataAttributes() {} + + @JsonCreator + public CreateStatusPageEmailAccessPolicyRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_EFFECT) ExecutionPolicyEffect effect, + @JsonProperty(required = true, value = JSON_PROPERTY_PATTERN) String pattern) { + this.effect = effect; + this.unparsed |= !effect.isValid(); + this.pattern = pattern; + } + + public CreateStatusPageEmailAccessPolicyRequestDataAttributes effect( + ExecutionPolicyEffect effect) { + this.effect = effect; + this.unparsed |= !effect.isValid(); + return this; + } + + /** + * Whether the policy allows or denies matching actions. + * + * @return effect + */ + @JsonProperty(JSON_PROPERTY_EFFECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionPolicyEffect getEffect() { + return effect; + } + + public void setEffect(ExecutionPolicyEffect effect) { + if (!effect.isValid()) { + this.unparsed = true; + } + this.effect = effect; + } + + public CreateStatusPageEmailAccessPolicyRequestDataAttributes pattern(String pattern) { + this.pattern = pattern; + return this; + } + + /** + * The email address pattern matched by the policy. Supports an exact address ( + * user@example.com), all addresses in a domain (@example.com), or all + * addresses in subdomains (@*.example.com). + * + * @return pattern + */ + @JsonProperty(JSON_PROPERTY_PATTERN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPattern() { + return pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + /** + * 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 CreateStatusPageEmailAccessPolicyRequestDataAttributes + */ + @JsonAnySetter + public CreateStatusPageEmailAccessPolicyRequestDataAttributes 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 CreateStatusPageEmailAccessPolicyRequestDataAttributes object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateStatusPageEmailAccessPolicyRequestDataAttributes + createStatusPageEmailAccessPolicyRequestDataAttributes = + (CreateStatusPageEmailAccessPolicyRequestDataAttributes) o; + return Objects.equals( + this.effect, createStatusPageEmailAccessPolicyRequestDataAttributes.effect) + && Objects.equals( + this.pattern, createStatusPageEmailAccessPolicyRequestDataAttributes.pattern) + && Objects.equals( + this.additionalProperties, + createStatusPageEmailAccessPolicyRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(effect, pattern, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateStatusPageEmailAccessPolicyRequestDataAttributes {\n"); + sb.append(" effect: ").append(toIndentedString(effect)).append("\n"); + sb.append(" pattern: ").append(toIndentedString(pattern)).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/CreateStatusPageRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributes.java index e955f96c215..e683aa94c27 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributes.java @@ -166,9 +166,10 @@ public CreateStatusPageRequestDataAttributes domainPrefix(String domainPrefix) { } /** - * The subdomain of the status page's url taking the form - * https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status - * Pages. + * The subdomain of the status page URL. Public pages use + * https://{domain_prefix}.statuspage.datadoghq.com, while private pages use + * https://{domain_prefix}.private.statuspage.datadoghq.com. Globally unique across Datadog + * Status Pages. * * @return domainPrefix */ @@ -337,7 +338,10 @@ public CreateStatusPageRequestDataAttributes type( } /** - * The type of the status page controlling how the status page is accessed. + * The type of the status page controlling how the status page is accessed. Public pages are + * accessible to anyone, internal pages are accessible to authenticated users in the Datadog + * organization, and private pages are accessible only to users matching an allow email access + * policy and no deny email access policy. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesType.java b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesType.java index bb59a29c7b3..a01791ad97c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesType.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateStatusPageRequestDataAttributesType.java @@ -18,7 +18,12 @@ import java.util.HashSet; import java.util.Set; -/** The type of the status page controlling how the status page is accessed. */ +/** + * The type of the status page controlling how the status page is accessed. Public pages are + * accessible to anyone, internal pages are accessible to authenticated users in the Datadog + * organization, and private pages are accessible only to users matching an allow email access + * policy and no deny email access policy. + */ @JsonSerialize( using = CreateStatusPageRequestDataAttributesType @@ -26,12 +31,14 @@ public class CreateStatusPageRequestDataAttributesType extends ModelEnum { private static final Set allowedValues = - new HashSet(Arrays.asList("public", "internal")); + new HashSet(Arrays.asList("public", "internal", "private")); public static final CreateStatusPageRequestDataAttributesType PUBLIC = new CreateStatusPageRequestDataAttributesType("public"); public static final CreateStatusPageRequestDataAttributesType INTERNAL = new CreateStatusPageRequestDataAttributesType("internal"); + public static final CreateStatusPageRequestDataAttributesType PRIVATE = + new CreateStatusPageRequestDataAttributesType("private"); CreateStatusPageRequestDataAttributesType(String value) { super(value, allowedValues); diff --git a/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestDataAttributes.java index 9161f8f7ac5..84b97167b56 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/PatchStatusPageRequestDataAttributes.java @@ -99,9 +99,10 @@ public PatchStatusPageRequestDataAttributes domainPrefix(String domainPrefix) { } /** - * The subdomain of the status page's url taking the form - * https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status - * Pages. + * The subdomain of the status page URL. Public pages use + * https://{domain_prefix}.statuspage.datadoghq.com, while private pages use + * https://{domain_prefix}.private.statuspage.datadoghq.com. Globally unique across Datadog + * Status Pages. * * @return domainPrefix */ @@ -271,7 +272,10 @@ public PatchStatusPageRequestDataAttributes type(CreateStatusPageRequestDataAttr } /** - * The type of the status page controlling how the status page is accessed. + * The type of the status page controlling how the status page is accessed. Public pages are + * accessible to anyone, internal pages are accessible to authenticated users in the Datadog + * organization, and private pages are accessible only to users matching an allow email access + * policy and no deny email access policy. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributes.java index f7d16663cbe..b927b9d724b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageAsIncludedAttributes.java @@ -235,9 +235,10 @@ public StatusPageAsIncludedAttributes domainPrefix(String domainPrefix) { } /** - * The subdomain of the status page's url taking the form - * https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status - * Pages. + * The subdomain of the status page URL. Public pages use + * https://{domain_prefix}.statuspage.datadoghq.com, while private pages use + * https://{domain_prefix}.private.statuspage.datadoghq.com. Globally unique across Datadog + * Status Pages. * * @return domainPrefix */ @@ -470,7 +471,10 @@ public StatusPageAsIncludedAttributes type(CreateStatusPageRequestDataAttributes } /** - * The type of the status page controlling how the status page is accessed. + * The type of the status page controlling how the status page is accessed. Public pages are + * accessible to anyone, internal pages are accessible to authenticated users in the Datadog + * organization, and private pages are accessible only to users matching an allow email access + * policy and no deny email access policy. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributes.java index 998b968323d..9dd3fa60efd 100644 --- a/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageDataAttributes.java @@ -256,9 +256,10 @@ public StatusPageDataAttributes domainPrefix(String domainPrefix) { } /** - * The subdomain of the status page's url taking the form - * https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status - * Pages. + * The subdomain of the status page URL. Public pages use + * https://{domain_prefix}.statuspage.datadoghq.com, while private pages use + * https://{domain_prefix}.private.statuspage.datadoghq.com. Globally unique across Datadog + * Status Pages. * * @return domainPrefix */ @@ -510,7 +511,10 @@ public StatusPageDataAttributes type(CreateStatusPageRequestDataAttributesType t } /** - * The type of the status page controlling how the status page is accessed. + * The type of the status page controlling how the status page is accessed. Public pages are + * accessible to anyone, internal pages are accessible to authenticated users in the Datadog + * organization, and private pages are accessible only to users matching an allow email access + * policy and no deny email access policy. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyArrayResponse.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyArrayResponse.java new file mode 100644 index 00000000000..cdc4b1caedd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyArrayResponse.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.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 object for a list of status page email access policies. */ +@JsonPropertyOrder({ + StatusPageEmailAccessPolicyArrayResponse.JSON_PROPERTY_DATA, + StatusPageEmailAccessPolicyArrayResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyArrayResponse { + @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 StatusPageEmailAccessPolicyArrayResponse() {} + + @JsonCreator + public StatusPageEmailAccessPolicyArrayResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (StatusPageEmailAccessPolicyData item : data) { + this.unparsed |= item.unparsed; + } + } + + public StatusPageEmailAccessPolicyArrayResponse data(List data) { + this.data = data; + for (StatusPageEmailAccessPolicyData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StatusPageEmailAccessPolicyArrayResponse addDataItem( + StatusPageEmailAccessPolicyData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * A list of status page email access policy data objects. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (StatusPageEmailAccessPolicyData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public StatusPageEmailAccessPolicyArrayResponse included( + List included) { + this.included = included; + if (included != null) { + for (StatusPageEmailAccessPolicyIncluded item : included) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public StatusPageEmailAccessPolicyArrayResponse addIncludedItem( + StatusPageEmailAccessPolicyIncluded includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Resources related to the email access policies, when requested using the include + * query parameter. + * + * @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; + if (included != null) { + for (StatusPageEmailAccessPolicyIncluded item : included) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 StatusPageEmailAccessPolicyArrayResponse + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyArrayResponse 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 StatusPageEmailAccessPolicyArrayResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyArrayResponse statusPageEmailAccessPolicyArrayResponse = + (StatusPageEmailAccessPolicyArrayResponse) o; + return Objects.equals(this.data, statusPageEmailAccessPolicyArrayResponse.data) + && Objects.equals(this.included, statusPageEmailAccessPolicyArrayResponse.included) + && Objects.equals( + this.additionalProperties, + statusPageEmailAccessPolicyArrayResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyArrayResponse {\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/StatusPageEmailAccessPolicyData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyData.java new file mode 100644 index 00000000000..9f9517938a9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyData.java @@ -0,0 +1,253 @@ +/* + * 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 data object for a status page email access policy. */ +@JsonPropertyOrder({ + StatusPageEmailAccessPolicyData.JSON_PROPERTY_ATTRIBUTES, + StatusPageEmailAccessPolicyData.JSON_PROPERTY_ID, + StatusPageEmailAccessPolicyData.JSON_PROPERTY_RELATIONSHIPS, + StatusPageEmailAccessPolicyData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StatusPageEmailAccessPolicyDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private StatusPageEmailAccessPolicyDataRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageEmailAccessPolicyType type = + StatusPageEmailAccessPolicyType.EMAIL_ACCESS_POLICIES; + + public StatusPageEmailAccessPolicyData() {} + + @JsonCreator + public StatusPageEmailAccessPolicyData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + StatusPageEmailAccessPolicyDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + StatusPageEmailAccessPolicyDataRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + StatusPageEmailAccessPolicyType 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 StatusPageEmailAccessPolicyData attributes( + StatusPageEmailAccessPolicyDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a status page email access policy. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(StatusPageEmailAccessPolicyDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public StatusPageEmailAccessPolicyData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the email access policy. + * + * @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 StatusPageEmailAccessPolicyData relationships( + StatusPageEmailAccessPolicyDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships of a status page email access policy. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyDataRelationships getRelationships() { + return relationships; + } + + public void setRelationships(StatusPageEmailAccessPolicyDataRelationships relationships) { + this.relationships = relationships; + if (relationships != null) { + this.unparsed |= relationships.unparsed; + } + } + + public StatusPageEmailAccessPolicyData type(StatusPageEmailAccessPolicyType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status page email access policy resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyType getType() { + return type; + } + + public void setType(StatusPageEmailAccessPolicyType 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 StatusPageEmailAccessPolicyData + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyData 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 StatusPageEmailAccessPolicyData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyData statusPageEmailAccessPolicyData = + (StatusPageEmailAccessPolicyData) o; + return Objects.equals(this.attributes, statusPageEmailAccessPolicyData.attributes) + && Objects.equals(this.id, statusPageEmailAccessPolicyData.id) + && Objects.equals(this.relationships, statusPageEmailAccessPolicyData.relationships) + && Objects.equals(this.type, statusPageEmailAccessPolicyData.type) + && Objects.equals( + this.additionalProperties, statusPageEmailAccessPolicyData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyData {\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/StatusPageEmailAccessPolicyDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataAttributes.java new file mode 100644 index 00000000000..3327f0de493 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataAttributes.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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a status page email access policy. */ +@JsonPropertyOrder({ + StatusPageEmailAccessPolicyDataAttributes.JSON_PROPERTY_CREATED_AT, + StatusPageEmailAccessPolicyDataAttributes.JSON_PROPERTY_EFFECT, + StatusPageEmailAccessPolicyDataAttributes.JSON_PROPERTY_PATTERN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EFFECT = "effect"; + private ExecutionPolicyEffect effect; + + public static final String JSON_PROPERTY_PATTERN = "pattern"; + private String pattern; + + public StatusPageEmailAccessPolicyDataAttributes() {} + + @JsonCreator + public StatusPageEmailAccessPolicyDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EFFECT) ExecutionPolicyEffect effect, + @JsonProperty(required = true, value = JSON_PROPERTY_PATTERN) String pattern) { + this.createdAt = createdAt; + this.effect = effect; + this.unparsed |= !effect.isValid(); + this.pattern = pattern; + } + + public StatusPageEmailAccessPolicyDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp of when the email access policy was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public StatusPageEmailAccessPolicyDataAttributes effect(ExecutionPolicyEffect effect) { + this.effect = effect; + this.unparsed |= !effect.isValid(); + return this; + } + + /** + * Whether the policy allows or denies matching actions. + * + * @return effect + */ + @JsonProperty(JSON_PROPERTY_EFFECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionPolicyEffect getEffect() { + return effect; + } + + public void setEffect(ExecutionPolicyEffect effect) { + if (!effect.isValid()) { + this.unparsed = true; + } + this.effect = effect; + } + + public StatusPageEmailAccessPolicyDataAttributes pattern(String pattern) { + this.pattern = pattern; + return this; + } + + /** + * The email address pattern matched by the policy. + * + * @return pattern + */ + @JsonProperty(JSON_PROPERTY_PATTERN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPattern() { + return pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + /** + * 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 StatusPageEmailAccessPolicyDataAttributes + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyDataAttributes 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 StatusPageEmailAccessPolicyDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyDataAttributes statusPageEmailAccessPolicyDataAttributes = + (StatusPageEmailAccessPolicyDataAttributes) o; + return Objects.equals(this.createdAt, statusPageEmailAccessPolicyDataAttributes.createdAt) + && Objects.equals(this.effect, statusPageEmailAccessPolicyDataAttributes.effect) + && Objects.equals(this.pattern, statusPageEmailAccessPolicyDataAttributes.pattern) + && Objects.equals( + this.additionalProperties, + statusPageEmailAccessPolicyDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, effect, pattern, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyDataAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" effect: ").append(toIndentedString(effect)).append("\n"); + sb.append(" pattern: ").append(toIndentedString(pattern)).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/StatusPageEmailAccessPolicyDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationships.java new file mode 100644 index 00000000000..45afa12b79f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationships.java @@ -0,0 +1,193 @@ +/* + * 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; + +/** Relationships of a status page email access policy. */ +@JsonPropertyOrder({ + StatusPageEmailAccessPolicyDataRelationships.JSON_PROPERTY_CREATED_BY_USER, + StatusPageEmailAccessPolicyDataRelationships.JSON_PROPERTY_STATUS_PAGE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_BY_USER = "created_by_user"; + private StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser createdByUser; + + public static final String JSON_PROPERTY_STATUS_PAGE = "status_page"; + private StatusPageEmailAccessPolicyDataRelationshipsStatusPage statusPage; + + public StatusPageEmailAccessPolicyDataRelationships() {} + + @JsonCreator + public StatusPageEmailAccessPolicyDataRelationships( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY_USER) + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser createdByUser, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS_PAGE) + StatusPageEmailAccessPolicyDataRelationshipsStatusPage statusPage) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + this.statusPage = statusPage; + this.unparsed |= statusPage.unparsed; + } + + public StatusPageEmailAccessPolicyDataRelationships createdByUser( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + this.unparsed |= createdByUser.unparsed; + return this; + } + + /** + * The Datadog user who created the email access policy. + * + * @return createdByUser + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY_USER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser getCreatedByUser() { + return createdByUser; + } + + public void setCreatedByUser( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser createdByUser) { + this.createdByUser = createdByUser; + if (createdByUser != null) { + this.unparsed |= createdByUser.unparsed; + } + } + + public StatusPageEmailAccessPolicyDataRelationships statusPage( + StatusPageEmailAccessPolicyDataRelationshipsStatusPage statusPage) { + this.statusPage = statusPage; + this.unparsed |= statusPage.unparsed; + return this; + } + + /** + * The status page associated with the email access policy. + * + * @return statusPage + */ + @JsonProperty(JSON_PROPERTY_STATUS_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyDataRelationshipsStatusPage getStatusPage() { + return statusPage; + } + + public void setStatusPage(StatusPageEmailAccessPolicyDataRelationshipsStatusPage statusPage) { + this.statusPage = statusPage; + if (statusPage != null) { + this.unparsed |= statusPage.unparsed; + } + } + + /** + * 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 StatusPageEmailAccessPolicyDataRelationships + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyDataRelationships 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 StatusPageEmailAccessPolicyDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyDataRelationships statusPageEmailAccessPolicyDataRelationships = + (StatusPageEmailAccessPolicyDataRelationships) o; + return Objects.equals( + this.createdByUser, statusPageEmailAccessPolicyDataRelationships.createdByUser) + && Objects.equals(this.statusPage, statusPageEmailAccessPolicyDataRelationships.statusPage) + && Objects.equals( + this.additionalProperties, + statusPageEmailAccessPolicyDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdByUser, statusPage, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyDataRelationships {\n"); + sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); + sb.append(" statusPage: ").append(toIndentedString(statusPage)).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/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser.java new file mode 100644 index 00000000000..f6bd3f15d38 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser.java @@ -0,0 +1,158 @@ +/* + * 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 Datadog user who created the email access policy. */ +@JsonPropertyOrder({StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData data; + + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser() {} + + @JsonCreator + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser data( + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object identifying the Datadog user who created the email access policy. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData getData() { + return data; + } + + public void setData(StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser 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 StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser + statusPageEmailAccessPolicyDataRelationshipsCreatedByUser = + (StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser) o; + return Objects.equals(this.data, statusPageEmailAccessPolicyDataRelationshipsCreatedByUser.data) + && Objects.equals( + this.additionalProperties, + statusPageEmailAccessPolicyDataRelationshipsCreatedByUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyDataRelationshipsCreatedByUser {\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/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData.java new file mode 100644 index 00000000000..51a68787e4b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData.java @@ -0,0 +1,189 @@ +/* + * 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 data object identifying the Datadog user who created the email access policy. */ +@JsonPropertyOrder({ + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData.JSON_PROPERTY_ID, + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPagesUserType type = StatusPagesUserType.USERS; + + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData() {} + + @JsonCreator + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPagesUserType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the Datadog user who created the email access policy. + * + * @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 StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData type( + StatusPagesUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPagesUserType getType() { + return type; + } + + public void setType(StatusPagesUserType 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 StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData 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 StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData + statusPageEmailAccessPolicyDataRelationshipsCreatedByUserData = + (StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData) o; + return Objects.equals(this.id, statusPageEmailAccessPolicyDataRelationshipsCreatedByUserData.id) + && Objects.equals( + this.type, statusPageEmailAccessPolicyDataRelationshipsCreatedByUserData.type) + && Objects.equals( + this.additionalProperties, + statusPageEmailAccessPolicyDataRelationshipsCreatedByUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyDataRelationshipsCreatedByUserData {\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/StatusPageEmailAccessPolicyDataRelationshipsStatusPage.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationshipsStatusPage.java new file mode 100644 index 00000000000..16e6d65fa35 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationshipsStatusPage.java @@ -0,0 +1,158 @@ +/* + * 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 status page associated with the email access policy. */ +@JsonPropertyOrder({StatusPageEmailAccessPolicyDataRelationshipsStatusPage.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyDataRelationshipsStatusPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPageEmailAccessPolicyDataRelationshipsStatusPageData data; + + public StatusPageEmailAccessPolicyDataRelationshipsStatusPage() {} + + @JsonCreator + public StatusPageEmailAccessPolicyDataRelationshipsStatusPage( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPageEmailAccessPolicyDataRelationshipsStatusPage data( + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object identifying the status page associated with the email access policy. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyDataRelationshipsStatusPageData getData() { + return data; + } + + public void setData(StatusPageEmailAccessPolicyDataRelationshipsStatusPageData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 StatusPageEmailAccessPolicyDataRelationshipsStatusPage + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyDataRelationshipsStatusPage 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 StatusPageEmailAccessPolicyDataRelationshipsStatusPage object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyDataRelationshipsStatusPage + statusPageEmailAccessPolicyDataRelationshipsStatusPage = + (StatusPageEmailAccessPolicyDataRelationshipsStatusPage) o; + return Objects.equals(this.data, statusPageEmailAccessPolicyDataRelationshipsStatusPage.data) + && Objects.equals( + this.additionalProperties, + statusPageEmailAccessPolicyDataRelationshipsStatusPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyDataRelationshipsStatusPage {\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/StatusPageEmailAccessPolicyDataRelationshipsStatusPageData.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationshipsStatusPageData.java new file mode 100644 index 00000000000..e73a2df9d25 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyDataRelationshipsStatusPageData.java @@ -0,0 +1,188 @@ +/* + * 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 data object identifying the status page associated with the email access policy. */ +@JsonPropertyOrder({ + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData.JSON_PROPERTY_ID, + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyDataRelationshipsStatusPageData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StatusPageDataType type = StatusPageDataType.STATUS_PAGES; + + public StatusPageEmailAccessPolicyDataRelationshipsStatusPageData() {} + + @JsonCreator + public StatusPageEmailAccessPolicyDataRelationshipsStatusPageData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StatusPageDataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StatusPageEmailAccessPolicyDataRelationshipsStatusPageData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the status page associated with the email access policy. + * + * @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 StatusPageEmailAccessPolicyDataRelationshipsStatusPageData type(StatusPageDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Status pages resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageDataType getType() { + return type; + } + + public void setType(StatusPageDataType 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 StatusPageEmailAccessPolicyDataRelationshipsStatusPageData + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyDataRelationshipsStatusPageData 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 StatusPageEmailAccessPolicyDataRelationshipsStatusPageData object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyDataRelationshipsStatusPageData + statusPageEmailAccessPolicyDataRelationshipsStatusPageData = + (StatusPageEmailAccessPolicyDataRelationshipsStatusPageData) o; + return Objects.equals(this.id, statusPageEmailAccessPolicyDataRelationshipsStatusPageData.id) + && Objects.equals( + this.type, statusPageEmailAccessPolicyDataRelationshipsStatusPageData.type) + && Objects.equals( + this.additionalProperties, + statusPageEmailAccessPolicyDataRelationshipsStatusPageData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyDataRelationshipsStatusPageData {\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/StatusPageEmailAccessPolicyIncluded.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyIncluded.java new file mode 100644 index 00000000000..66037e53201 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyIncluded.java @@ -0,0 +1,286 @@ +/* + * 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 = + StatusPageEmailAccessPolicyIncluded.StatusPageEmailAccessPolicyIncludedDeserializer.class) +@JsonSerialize( + using = StatusPageEmailAccessPolicyIncluded.StatusPageEmailAccessPolicyIncludedSerializer.class) +public class StatusPageEmailAccessPolicyIncluded extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(StatusPageEmailAccessPolicyIncluded.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class StatusPageEmailAccessPolicyIncludedSerializer + extends StdSerializer { + public StatusPageEmailAccessPolicyIncludedSerializer( + Class t) { + super(t); + } + + public StatusPageEmailAccessPolicyIncludedSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPageEmailAccessPolicyIncluded value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class StatusPageEmailAccessPolicyIncludedDeserializer + extends StdDeserializer { + public StatusPageEmailAccessPolicyIncludedDeserializer() { + this(StatusPageEmailAccessPolicyIncluded.class); + } + + public StatusPageEmailAccessPolicyIncludedDeserializer(Class vc) { + super(vc); + } + + @Override + public StatusPageEmailAccessPolicyIncluded 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 StatusPagesUser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (StatusPagesUser.class.equals(Integer.class) + || StatusPagesUser.class.equals(Long.class) + || StatusPagesUser.class.equals(Float.class) + || StatusPagesUser.class.equals(Double.class) + || StatusPagesUser.class.equals(Boolean.class) + || StatusPagesUser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((StatusPagesUser.class.equals(Integer.class) + || StatusPagesUser.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((StatusPagesUser.class.equals(Float.class) + || StatusPagesUser.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (StatusPagesUser.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (StatusPagesUser.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(StatusPagesUser.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 (!((StatusPagesUser) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'StatusPagesUser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'StatusPagesUser'", e); + } + + // deserialize StatusPageAsIncluded + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (StatusPageAsIncluded.class.equals(Integer.class) + || StatusPageAsIncluded.class.equals(Long.class) + || StatusPageAsIncluded.class.equals(Float.class) + || StatusPageAsIncluded.class.equals(Double.class) + || StatusPageAsIncluded.class.equals(Boolean.class) + || StatusPageAsIncluded.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((StatusPageAsIncluded.class.equals(Integer.class) + || StatusPageAsIncluded.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((StatusPageAsIncluded.class.equals(Float.class) + || StatusPageAsIncluded.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (StatusPageAsIncluded.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (StatusPageAsIncluded.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(StatusPageAsIncluded.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 (!((StatusPageAsIncluded) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'StatusPageAsIncluded'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'StatusPageAsIncluded'", e); + } + + StatusPageEmailAccessPolicyIncluded ret = new StatusPageEmailAccessPolicyIncluded(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public StatusPageEmailAccessPolicyIncluded getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "StatusPageEmailAccessPolicyIncluded cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public StatusPageEmailAccessPolicyIncluded() { + super("oneOf", Boolean.FALSE); + } + + public StatusPageEmailAccessPolicyIncluded(StatusPagesUser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public StatusPageEmailAccessPolicyIncluded(StatusPageAsIncluded o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("StatusPagesUser", new GenericType() {}); + schemas.put("StatusPageAsIncluded", new GenericType() {}); + JSON.registerDescendants( + StatusPageEmailAccessPolicyIncluded.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return StatusPageEmailAccessPolicyIncluded.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: StatusPagesUser, StatusPageAsIncluded + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(StatusPagesUser.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(StatusPageAsIncluded.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be StatusPagesUser, StatusPageAsIncluded"); + } + + /** + * Get the actual instance, which can be the following: StatusPagesUser, StatusPageAsIncluded + * + * @return The actual instance (StatusPagesUser, StatusPageAsIncluded) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `StatusPagesUser`. If the actual instance is not `StatusPagesUser`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `StatusPagesUser` + * @throws ClassCastException if the instance is not `StatusPagesUser` + */ + public StatusPagesUser getStatusPagesUser() throws ClassCastException { + return (StatusPagesUser) super.getActualInstance(); + } + + /** + * Get the actual instance of `StatusPageAsIncluded`. If the actual instance is not + * `StatusPageAsIncluded`, the ClassCastException will be thrown. + * + * @return The actual instance of `StatusPageAsIncluded` + * @throws ClassCastException if the instance is not `StatusPageAsIncluded` + */ + public StatusPageAsIncluded getStatusPageAsIncluded() throws ClassCastException { + return (StatusPageAsIncluded) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyResponse.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyResponse.java new file mode 100644 index 00000000000..1a76fbb9144 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyResponse.java @@ -0,0 +1,204 @@ +/* + * 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 object for a status page email access policy. */ +@JsonPropertyOrder({ + StatusPageEmailAccessPolicyResponse.JSON_PROPERTY_DATA, + StatusPageEmailAccessPolicyResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StatusPageEmailAccessPolicyResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private StatusPageEmailAccessPolicyData data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public StatusPageEmailAccessPolicyResponse() {} + + @JsonCreator + public StatusPageEmailAccessPolicyResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + StatusPageEmailAccessPolicyData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public StatusPageEmailAccessPolicyResponse data(StatusPageEmailAccessPolicyData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object for a status page email access policy. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusPageEmailAccessPolicyData getData() { + return data; + } + + public void setData(StatusPageEmailAccessPolicyData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + public StatusPageEmailAccessPolicyResponse included( + List included) { + this.included = included; + if (included != null) { + for (StatusPageEmailAccessPolicyIncluded item : included) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public StatusPageEmailAccessPolicyResponse addIncludedItem( + StatusPageEmailAccessPolicyIncluded includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Resources related to the email access policy, when requested using the include + * query parameter. + * + * @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; + if (included != null) { + for (StatusPageEmailAccessPolicyIncluded item : included) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 StatusPageEmailAccessPolicyResponse + */ + @JsonAnySetter + public StatusPageEmailAccessPolicyResponse 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 StatusPageEmailAccessPolicyResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusPageEmailAccessPolicyResponse statusPageEmailAccessPolicyResponse = + (StatusPageEmailAccessPolicyResponse) o; + return Objects.equals(this.data, statusPageEmailAccessPolicyResponse.data) + && Objects.equals(this.included, statusPageEmailAccessPolicyResponse.included) + && Objects.equals( + this.additionalProperties, statusPageEmailAccessPolicyResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusPageEmailAccessPolicyResponse {\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/StatusPageEmailAccessPolicyType.java b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyType.java new file mode 100644 index 00000000000..5ff742ab296 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StatusPageEmailAccessPolicyType.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; + +/** Status page email access policy resource type. */ +@JsonSerialize( + using = StatusPageEmailAccessPolicyType.StatusPageEmailAccessPolicyTypeSerializer.class) +public class StatusPageEmailAccessPolicyType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("email_access_policies")); + + public static final StatusPageEmailAccessPolicyType EMAIL_ACCESS_POLICIES = + new StatusPageEmailAccessPolicyType("email_access_policies"); + + StatusPageEmailAccessPolicyType(String value) { + super(value, allowedValues); + } + + public static class StatusPageEmailAccessPolicyTypeSerializer + extends StdSerializer { + public StatusPageEmailAccessPolicyTypeSerializer(Class t) { + super(t); + } + + public StatusPageEmailAccessPolicyTypeSerializer() { + this(null); + } + + @Override + public void serialize( + StatusPageEmailAccessPolicyType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static StatusPageEmailAccessPolicyType fromValue(String value) { + return new StatusPageEmailAccessPolicyType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index 604850914b8..e4b25fa6c1f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -1959,6 +1959,18 @@ "tag": "Service Level Objectives", "operationId": "CreateSLOReportJob" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"A Private Status Page\",\n \"domain_prefix\": \"private-{{ unique_hash }}\",\n \"type\": \"private\",\n \"visualization_type\": \"bars_and_uptime_percentage\"\n },\n \"type\": \"status_pages\"\n }\n}" + } + ], + "step": "there is a valid \"private_status_page\" in the system", + "key": "private_status_page", + "tag": "Status Pages", + "operationId": "CreateStatusPage" + }, { "parameters": [ { @@ -1971,6 +1983,22 @@ "tag": "Status Pages", "operationId": "CreateStatusPage" }, + { + "parameters": [ + { + "name": "page_id", + "value": "\"{{ private_status_page.data.id }}\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"email_access_policies\",\n \"attributes\": {\n \"effect\": \"allow\",\n \"pattern\": \"@example.com\"\n }\n }\n}" + } + ], + "step": "there is a valid \"email_access_policy\" in the system", + "key": "email_access_policy", + "tag": "Status Pages", + "operationId": "CreateEmailAccessPolicy" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/status_pages.feature b/src/test/resources/com/datadog/api/client/v2/api/status_pages.feature index 26237ffb612..1797e3b0b48 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/status_pages.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/status_pages.feature @@ -10,6 +10,38 @@ Feature: Status Pages And a valid "appKeyAuth" key in the system And an instance of "StatusPages" API + @generated @skip @team:ddoghq/incident-app + Scenario: Create an email access policy returns "Bad Request" response + Given new "CreateEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"effect": "allow", "pattern": "@example.com"}, "type": "email_access_policies"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: Create an email access policy returns "Conflict" response + Given new "CreateEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"effect": "allow", "pattern": "@example.com"}, "type": "email_access_policies"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/incident-app + Scenario: Create an email access policy returns "Created" response + Given new "CreateEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"effect": "allow", "pattern": "@example.com"}, "type": "email_access_policies"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/incident-app + Scenario: Create an email access policy returns "Not Found" response + Given new "CreateEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"effect": "allow", "pattern": "@example.com"}, "type": "email_access_policies"}} + When the request is sent + Then the response status is 404 Not Found + @team:ddoghq/incident-app Scenario: Create backfilled degradation returns "Created" response Given there is a valid "status_page" in the system @@ -83,6 +115,30 @@ Feature: Status Pages When the request is sent Then the response status is 201 Created + @generated @skip @team:ddoghq/incident-app + Scenario: Delete an email access policy returns "Bad Request" response + Given new "DeleteEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: Delete an email access policy returns "No Content" response + Given new "DeleteEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/incident-app + Scenario: Delete an email access policy returns "Not Found" response + Given new "DeleteEmailAccessPolicy" request + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @team:ddoghq/incident-app Scenario: Delete component returns "No Content" response Given new "DeleteComponent" request @@ -222,6 +278,27 @@ Feature: Status Pages When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/incident-app + Scenario: List email access policies returns "Bad Request" response + Given new "ListEmailAccessPolicies" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/incident-app + Scenario: List email access policies returns "Not Found" response + Given new "ListEmailAccessPolicies" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/incident-app + Scenario: List email access policies returns "OK" response + Given new "ListEmailAccessPolicies" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/incident-app Scenario: List maintenance templates returns "OK" response Given new "ListMaintenanceTemplates" 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 723033198e0..5fbaca4b1bf 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 @@ -10373,6 +10373,35 @@ "type": "idempotent" } }, + "ListEmailAccessPolicies": { + "tag": "Status Pages", + "undo": { + "type": "safe" + } + }, + "CreateEmailAccessPolicy": { + "tag": "Status Pages", + "undo": { + "operationId": "DeleteEmailAccessPolicy", + "parameters": [ + { + "name": "page_id", + "source": "data.relationships.status_page.data.id" + }, + { + "name": "policy_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteEmailAccessPolicy": { + "tag": "Status Pages", + "undo": { + "type": "idempotent" + } + }, "ListComponents": { "tag": "Status Pages", "undo": {